Closed
Bug 965872
Opened 11 years ago
Closed 11 years ago
Storage Inspector (Editor ? ) - actor for cookies, local storage and session storage
Categories
(DevTools :: Storage Inspector, defect)
DevTools
Storage Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 30
People
(Reporter: Optimizer, Assigned: Optimizer)
References
Details
(Whiteboard: [storage])
Attachments
(1 file, 8 obsolete files)
(deleted),
patch
|
Optimizer
:
review+
|
Details | Diff | Splinter Review |
This bug is for the backend of the storage tool.
This bug will cover the first iteration of the actors.
Attaching patch with:
- The main storage actor
- Three child actors : cookies, local storage and session storage.
For version 1, we are targeting read only. So the patch:
- Allows you to query and get all hosts and cookies/local storage items/session storage items
- All child iframes/windows etc are also listed.
- Gives live update on any change in the above three.
The detailed protocol definition is present at https://etherpad.mozilla.org/storage-inspector-protocol
Things to do:
- Lot of duplicate code
- On some sites, local(session)storage checks for the dom-storage2-changed event are not working properly because of how it is implemented right now.
- The update event should be batched.
- Add comments.
- Cookies created via Set-Cookie header from network calls are not accessible. There is no way to link these cookies to the current web page as the domain of those cookies is different and platform does not link them to the current page domains.
- Make sure the actor works in chrome mode.
- Make sure the actor works across products (android, FxOS etc)
Here is a little script to see the actor in action : https://gist.github.com/scrapmac/8714857
(Run this on a webpage, like facebook etc)
Attachment #8368027 -
Flags: feedback?
Assignee | ||
Updated•11 years ago
|
Attachment #8368027 -
Flags: feedback? → feedback?(paul)
Assignee | ||
Comment 1•11 years ago
|
||
Things to do:
- Lot of duplicate code
- Add comments.
- Cookies created via Set-Cookie header from network calls are not accessible. There is no way to link these cookies to the current web page as the domain of those cookies is different and platform does not link them to the current page domains.
- Make sure the actor works in chrome mode.
- Make sure the actor works across products (android, FxOS etc)
Comment 2•11 years ago
|
||
Comment on attachment 8368027 [details] [diff] [review]
actor
Yes! This looks excellent.
I have not done a serious review, but it looks like the right way to do it.
For the next round, please make sure to add comments (many, I'm dumb),
and some tests.
I don't think we want to work on the frontend here, but it'd be nice
if you could share some scratchpad code to test these actors.
---
>+types.addDictType("storeUpdateObject", {
>+ changed: "nullable:json",
>+ deleted: "nullable:json",
>+ added: "nullable:json"
>+});
"storetransactionobject" maybe.
>+
>+// Cookies actor and front
>+
>+
>+let CookiesActor = protocol.ActorClass({
>+ typeName: "cookies",
>+
>+ get conn() {
>+ return this.storageActor.conn;
>+ },
>+
>+ get hosts() {
>+ let hosts = new Set();
>+ for (let {location} of this.storageActor.windows) {
this.windows
>+ if (changed) {
>+ events.emit(this, "window-" + event.type + "ed", window);
I died a little.
Attachment #8368027 -
Flags: feedback?(paul) → feedback+
Comment 3•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #1)
> - Cookies created via Set-Cookie header from network calls are not
> accessible. There is no way to link these cookies to the current web page as
> the domain of those cookies is different and platform does not link them to
> the current page domains.
Can you explain that?
> - Make sure the actor works in chrome mode.
Do we really care?
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #3)
> (In reply to Girish Sharma [:Optimizer] from comment #1)
> > - Cookies created via Set-Cookie header from network calls are not
> > accessible. There is no way to link these cookies to the current web page as
> > the domain of those cookies is different and platform does not link them to
> > the current page domains.
>
> Can you explain that?
Using the gist that I posted in comment 0 to list out all the cookies.
Go to nytimes.com and list out all cookies for host "nytimes.com" . Compare the list with what Chrome devtools show you under the host "nytimes.com" . In Chrome, you will see many other cookies from sites like "doubleclick.net" , "imrworldwide.com" . These cookies were created when images were loaded from these sites as a part of "Set-Cookie" response header.
> > - Make sure the actor works in chrome mode.
>
> Do we really care?
Browser Toolbox won't need this tool ?
Comment 5•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #4)
> (In reply to Paul Rouget [:paul] from comment #3)
> > (In reply to Girish Sharma [:Optimizer] from comment #1)
> > > - Cookies created via Set-Cookie header from network calls are not
> > > accessible. There is no way to link these cookies to the current web page as
> > > the domain of those cookies is different and platform does not link them to
> > > the current page domains.
> >
> > Can you explain that?
>
> Using the gist that I posted in comment 0 to list out all the cookies.
>
> Go to nytimes.com and list out all cookies for host "nytimes.com" . Compare
> the list with what Chrome devtools show you under the host "nytimes.com" .
> In Chrome, you will see many other cookies from sites like "doubleclick.net"
> , "imrworldwide.com" . These cookies were created when images were loaded
> from these sites as a part of "Set-Cookie" response header.
How can we fix that? Maybe you want to ask on dev-platform?
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #5)
> (In reply to Girish Sharma [:Optimizer] from comment #4)
> > (In reply to Paul Rouget [:paul] from comment #3)
> > > (In reply to Girish Sharma [:Optimizer] from comment #1)
> > > > - Cookies created via Set-Cookie header from network calls are not
> > > > accessible. There is no way to link these cookies to the current web page as
> > > > the domain of those cookies is different and platform does not link them to
> > > > the current page domains.
> > >
> > > Can you explain that?
> >
> > Using the gist that I posted in comment 0 to list out all the cookies.
> >
> > Go to nytimes.com and list out all cookies for host "nytimes.com" . Compare
> > the list with what Chrome devtools show you under the host "nytimes.com" .
> > In Chrome, you will see many other cookies from sites like "doubleclick.net"
> > , "imrworldwide.com" . These cookies were created when images were loaded
> > from these sites as a part of "Set-Cookie" response header.
>
> How can we fix that? Maybe you want to ask on dev-platform?
filed bug 970246
Assignee | ||
Comment 7•11 years ago
|
||
Things to do:
- Figure out why the unload event on ChromeEventHandler for google.co.in does not fire.
- Add a property in "dom-storage2-change" notification to tell the type of storage as window.localStorage == event.storageArea does not work if window was obtained from "load" event of ChromeEventHandler of the docshell.
- Make sure the actor works in chrome mode.
- Make sure the actor works across products (android, FxOS etc)
Assignee | ||
Comment 8•11 years ago
|
||
This is more or less ready for review. I have filed bugs for what I found were platform issues. There are a couple of more known issues too, which I will try to figure out and fix in the time being, or open new bugs if they are too big of issues.
Things to do:
- Figure out why the unload event on ChromeEventHandler for google.co.in does not fire.
- Handle edge cases , like when local storage is not accessible. etc.
- Cookies start getting added before the window is completely loaded and thus have a reference to the hostname.
- Make sure the actor works in chrome mode.
- Make sure the actor works across products (android, FxOS etc)
Attachment #8368027 -
Attachment is obsolete: true
Attachment #8373573 -
Flags: review?(paul)
Assignee | ||
Updated•11 years ago
|
Attachment #8373573 -
Flags: review?(paul) → review?(jwalker)
As a note: would it be possible to create a panel/window that will show in an styled way all current window storage? Including flash cookies, that would help have an overview of what's currently going on in a web page.
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to sys.sgx from comment #9)
> As a note: would it be possible to create a panel/window that will show in
> an styled way all current window storage? Including flash cookies, that
> would help have an overview of what's currently going on in a web page.
you mean to see (all the cookies + key-value pairs of *storage + indexed db entries + what not ) at once ?
Not just being heavy on the protocol layer, it would be too much of an information imo.
Maybe we can have a summary of everything, like
"10 cookies in 2 frames and 5 local storage keys in 3 frames" ?
About flash cookies - I will have to see if platform has APIs to get them. But are they being used that much ?
Comment 11•11 years ago
|
||
Yes, that's pretty much the point; have something panel-like that will allow for easy overview of what is currently on memory for this window (not full details). About the flash cookies, it's about privacy and being able to modify which ones are stored in the browser.
Assignee | ||
Comment 12•11 years ago
|
||
Fixed a couple of issues where localstroage is inaccessible and hostname is not present.
Also fixed the way the "cookie list" command pairs up cookies with current page.
I still have to replace the docshell load and unload with something else as it has many issues that I am discovering one by one.
this is the thread in dev-platform for the reference. - https://groups.google.com/forum/#!topic/mozilla.dev.platform/9qmcvjg_0G4
Attachment #8373573 -
Attachment is obsolete: true
Attachment #8373573 -
Flags: review?(jwalker)
Attachment #8375025 -
Flags: review?(jwalker)
Comment 13•11 years ago
|
||
Comment on attachment 8375025 [details] [diff] [review]
patch v0.2
Review of attachment 8375025 [details] [diff] [review]:
-----------------------------------------------------------------
I like it so far.
This is more of a f+ than an r+ because we've got tests etc still to do.
::: toolkit/devtools/server/actors/storage.js
@@ +109,5 @@
> + * The topic which this actor listens to via Notification Observers.
> + * @param {string} storeObjectType
> + * The RetVal type of the store object of this actor.
> + */
> +StorageActors.defaults = function(typeName, observationTopic, storeObjectType) {
It feels there are lots of levels to this. I'm having to jump up and down the code a lot to work out what's going on.
Can't we simplify things?
@@ +291,5 @@
> + * Actor.
> + *
> + * @See StorageActors.defaults()
> + * @param {object} options
> + * Options required by StorageActors.defaults method.
Please define them, at least by reference to the defaults function
Attachment #8375025 -
Flags: review?(jwalker)
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #13)
> Comment on attachment 8375025 [details] [diff] [review]
> patch v0.2
>
> Review of attachment 8375025 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I like it so far.
>
> This is more of a f+ than an r+ because we've got tests etc still to do.
>
> ::: toolkit/devtools/server/actors/storage.js
> @@ +109,5 @@
> > + * The topic which this actor listens to via Notification Observers.
> > + * @param {string} storeObjectType
> > + * The RetVal type of the store object of this actor.
> > + */
> > +StorageActors.defaults = function(typeName, observationTopic, storeObjectType) {
>
> It feels there are lots of levels to this. I'm having to jump up and down
> the code a lot to work out what's going on.
> Can't we simplify things?
It was previously simplified, but with lots and lots of repetition and thus, chances of error. Even I don't like this much code reusage , but now, adding a new actor is dead easy and small.
Do you have some suggestions on a good tradeoff ?
And yes, tests are next on my list :)
Assignee | ||
Comment 15•11 years ago
|
||
Added tests to check proper listing of cookies, local storage and session storage across iframes and main page.
try : https://tbpl.mozilla.org/?tree=Try&rev=124f1fc1718f
Attachment #8375025 -
Attachment is obsolete: true
Attachment #8377290 -
Flags: review?(jwalker)
Assignee | ||
Comment 16•11 years ago
|
||
[...contd.]
And also switched the new suggested way of tracking addition and deletion of windows (and not load and unload of windows). This new approach handles BFCached windows and chrome to content transitions perfectly well.
Also incorporated changes based on the patch from bug 970246 so that the cookies set vie SET-COOKIE (read comment 4 for more info) are also listed in the inspector. But only when the page load is happening while the tool is open.
Comment 17•11 years ago
|
||
No need to QI nsIDocShellTreeItem (nsIDocShell now inherits from it).
+ // Notifications that help us keep track of newly added windows and windows
+ // that got removed
+ Services.obs.addObserver(this, "content-document-global-created", false);
+ Services.obs.addObserver(this, "dom-window-destroyed", false);
Great!
+ window.top == this.window) {
This won't work in case of apps and mozbrowsers. Don't trust `.top` and `.parents`. Use docshell methods.
Assignee | ||
Comment 18•11 years ago
|
||
new try push : https://tbpl.mozilla.org/?tree=Try&rev=f30a097c91ee
Assignee | ||
Comment 19•11 years ago
|
||
- Using LayoutHelpers docshell involving methods instead of window.top.
- Fixed the xpcshell tests.
- Explicitly calling DebuggerServer.destroy() so that any left over actors are removed
- Some other console error fixes.
try : https://tbpl.mozilla.org/?tree=Try&rev=f34411b130a9
Attachment #8377290 -
Attachment is obsolete: true
Attachment #8377290 -
Flags: review?(jwalker)
Attachment #8377777 -
Flags: review?(jwalker)
Comment 20•11 years ago
|
||
It would be worth attaching some screenshots so as to view how it might look like and provide some feedback for the UI.
Assignee | ||
Comment 21•11 years ago
|
||
(In reply to sys.sgx from comment #20)
> It would be worth attaching some screenshots so as to view how it might look
> like and provide some feedback for the UI.
This bug is not for UI, bug 970517 is.
Assignee | ||
Comment 22•11 years ago
|
||
There was a discrepency of expires time unit in nsCookie and the http-on-response-set-cookie notification. Fixed it. Also fixed the cookie parsing logic in http-on-response-set-cookie case where somethings there will be no space b/w ; and next key, like Expires.
I also changed the packet structure from
hosts:[
{
host: "...",
stores: [...],
},
{
...
}]
to
hosts: {
<host1>: [...], // host: stores
...
}
because it was shorter and it let me manage the batched updates in an easier and faster manner.
The batched update has some issues like when sometimes, the a partiular cookie will get added and deleted (or modified) in the same batch and then frontend would not know what happened the last. So now the backend properly handles batch operation by clubbing this kind of situations. This also reduced the packet size a lot.
At this point, I would like to get some feedback on what all other properties of cookies are required from the web developer perspective ?
Size of cookies can be done on the front end itself. The remaining available properties are:
- isDomain
- isSecure
- policy
- status
- creationTime
- expiry
- isHttpOnly
- isSession
- lastAccessed
- rawHost
Attachment #8377777 -
Attachment is obsolete: true
Attachment #8377777 -
Flags: review?(jwalker)
Attachment #8379843 -
Flags: review?(jwalker)
Comment 23•11 years ago
|
||
Actually, having all of them would be nice. By adding a way to view these information for each entry it would provide more info to the dev.
Comment 24•11 years ago
|
||
Comment on attachment 8379843 [details] [diff] [review]
patch v0.5
Review of attachment 8379843 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good so far, one trivial comment.
What do you see as outstanding in this file?
::: toolkit/devtools/server/actors/storage.js
@@ +583,5 @@
> + * This method exists as both Local Storage and Session Storage have almost
> + * identical actors.
> + */
> +function getObjectForLocalOrSessionStorage(type) {
> +return {
Could we indent this properly?
Attachment #8379843 -
Flags: review?(jwalker)
Assignee | ||
Comment 25•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #24)
> Comment on attachment 8379843 [details] [diff] [review]
> patch v0.5
>
> Review of attachment 8379843 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good so far, one trivial comment.
> What do you see as outstanding in this file?
I am planning to add one more test to test dynamic frame additions and batch updates, should not be too much though.
Also, your opinion on the last question in comment 22 would be helpful :)
> ::: toolkit/devtools/server/actors/storage.js
> @@ +583,5 @@
> > + * This method exists as both Local Storage and Session Storage have almost
> > + * identical actors.
> > + */
> > +function getObjectForLocalOrSessionStorage(type) {
> > +return {
>
> Could we indent this properly?
I thought that it would be a wasted indentation, but I have nothing against it too :)
Other that this, do I assume it has an r+ overall ?
Comment 26•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #22)
> ...
>
> At this point, I would like to get some feedback on what all other
> properties of cookies are required from the web developer perspective ?
>
> Size of cookies can be done on the front end itself. The remaining available
> properties are:
>
> - isDomain
> - isSecure
> - isHttpOnly
> - isSession
> - expiry
I think these are all required from a web developer perspective
> - creationTime
> - lastAccessed
I'd say these could be useful, and we should include them if it's easy.
> - rawHost
This is derivable from the host, isn't it?
> - policy
> - status
I have no idea what these are. I can guess that status is derivable from the expiry date?
Assignee | ||
Comment 27•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #26)
> (In reply to Girish Sharma [:Optimizer] from comment #22)
> > ...
> >
> > At this point, I would like to get some feedback on what all other
> > properties of cookies are required from the web developer perspective ?
> >
> > Size of cookies can be done on the front end itself. The remaining available
> > properties are:
> >
> > - isDomain
> > - isSecure
> > - isHttpOnly
> > - isSession
> > - expiry
>
> I think these are all required from a web developer perspective
isSession can be derived from expires, same goes for expiry. I really don't know why nsiCookie2 has these properties
> > - creationTime
> > - lastAccessed
>
> I'd say these could be useful, and we should include them if it's easy.
These are directly available on the nsiCookie2 interface of the cookie object. So yes, easy.
> > - rawHost
>
> This is derivable from the host, isn't it?
>
> > - policy
> > - status
>
> I have no idea what these are. I can guess that status is derivable from the
> expiry date?
yeah, and even the mdn page for these gives 404.
So I will add:
isDomain
isSecure
isHttpOnly
creationTime
lastAccessed
But I will make their columns by default hidden (except for I guess lastAccessed time) as otherwise, it would be too much clutter
Comment 28•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #25)
> > Could we indent this properly?
>
> I thought that it would be a wasted indentation, but I have nothing against
> it too :)
Personally, I think the cost of the "what's going on here?" is greater than the cost to the right hand margin, but I'm not militant about it :)
> Other that this, do I assume it has an r+ overall ?
I'd like to spend a bit more time on storage.js, and have another play, but we're nearly there. Hopefully, I'll get this done today.
Comment 29•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #27)
> (In reply to Joe Walker [:jwalker] from comment #26)
> > (In reply to Girish Sharma [:Optimizer] from comment #22)
> > > ...
> > >
> > > Size of cookies can be done on the front end itself. The remaining available
> > > properties are:
> > >
> > > - isDomain
> > > - isSecure
> > > - isHttpOnly
> > > - isSession
> > > - expiry
> >
> > I think these are all required from a web developer perspective
>
> isSession can be derived from expires, same goes for expiry. I really don't
> know why nsiCookie2 has these properties
isSession is a thing that web developers talk about though. "It's a session cookie" so I think it's worth having that.
Assignee | ||
Comment 30•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #29)
> (In reply to Girish Sharma [:Optimizer] from comment #27)
> > (In reply to Joe Walker [:jwalker] from comment #26)
> > > (In reply to Girish Sharma [:Optimizer] from comment #22)
> > > > ...
> > > >
> > > > Size of cookies can be done on the front end itself. The remaining available
> > > > properties are:
> > > >
> > > > - isDomain
> > > > - isSecure
> > > > - isHttpOnly
> > > > - isSession
> > > > - expiry
> > >
> > > I think these are all required from a web developer perspective
> >
> > isSession can be derived from expires, same goes for expiry. I really don't
> > know why nsiCookie2 has these properties
>
> isSession is a thing that web developers talk about though. "It's a session
> cookie" so I think it's worth having that.
That can be inferred via expires == 0. Which the frontend is also showing. If you see.
This is how firebug and Chrome also display session cookies.
Having another column which true only for the cases where the Expires column read "session cookie" seems redundant.
Assignee | ||
Comment 31•11 years ago
|
||
err. Just reliased I missed out an STR step.
I meant:
"If you see the storage inspector video https://www.youtube.com/watch?feature=player_detailpage&v=evyaSydRqFk#t=84 , you will see the Expires tab saying "Session" for many cookies."
Comment 32•11 years ago
|
||
More thoughts from playing with the UI:
* We still have unresizable columns. Given that names and values have lengths that vary a lot, I don't think we can get away with this (I know this is an issue with the front end patch, but I'm obviously trying them out together)
* We've got data both in the table and in the pop-up side-bar. I don't think it needs to be in both places. Perhaps we should just have name|value in the main table, and all the other values in the side-bar. Or we should get rid of the side bar and have everything in the table. Probably UX should have some input here.
* We need an icon
* I'm not a fan of our 'tree' implementation, but I can live with it.
Comment 33•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #30)
> (In reply to Joe Walker [:jwalker] from comment #29)
> > (In reply to Girish Sharma [:Optimizer] from comment #27)
> > > (In reply to Joe Walker [:jwalker] from comment #26)
> > > > (In reply to Girish Sharma [:Optimizer] from comment #22)
> > > > > ...
> > > > >
> > > > > Size of cookies can be done on the front end itself. The remaining available
> > > > > properties are:
> > > > >
> > > > > - isDomain
> > > > > - isSecure
> > > > > - isHttpOnly
> > > > > - isSession
> > > > > - expiry
> > > >
> > > > I think these are all required from a web developer perspective
> > >
> > > isSession can be derived from expires, same goes for expiry. I really don't
> > > know why nsiCookie2 has these properties
> >
> > isSession is a thing that web developers talk about though. "It's a session
> > cookie" so I think it's worth having that.
>
> That can be inferred via expires == 0. Which the frontend is also showing.
> If you see.
>
> This is how firebug and Chrome also display session cookies.
>
> Having another column which true only for the cases where the Expires column
> read "session cookie" seems redundant.
I know it can be inferred. My point is that 'session' is a concept that has meaning to a web developer. They might ask the question 'is it a session cookie' and we should make that easy to answer.
Perhaps having a value of 'session' in the expires column would make sense.
Comment 34•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #31)
> err. Just reliased I missed out an STR step.
>
> I meant:
>
> "If you see the storage inspector video
> https://www.youtube.com/watch?feature=player_detailpage&v=evyaSydRqFk#t=84 ,
> you will see the Expires tab saying "Session" for many cookies."
Mid-air collisions. I agree.
Assignee | ||
Comment 35•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #32)
> More thoughts from playing with the UI:
>
> * We still have unresizable columns. Given that names and values have
> lengths that vary a lot, I don't think we can get away with this (I know
> this is an issue with the front end patch, but I'm obviously trying them out
> together)
But they *are* resizeable . Aren't they ? (Or are you suggesting to remove the resizing functionality from the columns)
> * We've got data both in the table and in the pop-up side-bar. I don't think
> it needs to be in both places. Perhaps we should just have name|value in the
> main table, and all the other values in the side-bar. Or we should get rid
> of the side bar and have everything in the table. Probably UX should have
> some input here.
The sidebar is helpful in many ways :
- Even if some columns are hidden, sidebar will show all properties anyways.
- Sidebar shows parsed value of cookies/localstorage items. If the value is of JSON type, or a key-separated array, or a key-value pair, it is shown as an object below the normal object.
- In future, I want to make the table rows multi-selectable (to perform various actions together). Then the sidebar will show all the selected items together.
> * We need an icon
Yes please :)
> * I'm not a fan of our 'tree' implementation, but I can live with it.
I agree. Moreover, this tree implementation will not work for Indexed DB. I think I will switch to itchpad's tree once indexed db part is done.
Comment 36•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #35)
> This is all really about the front end, so I replied in bug 970517 comment 26.
Comment 37•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #28)
> > Other that this, do I assume it has an r+ overall ?
>
> I'd like to spend a bit more time on storage.js, and have another play, but
> we're nearly there. Hopefully, I'll get this done today.
I've had another look, and I'd still like to see it again with better comments. FWIW a big consumer of source comments is the original reviewer, so I think in general it's a good idea to get those in place before asking for an r?
As far as landing plans go - I'm OK with landing this preffed off (and invisible using the options panel), in fact I think we should do this to prevent bitrot.
Assignee | ||
Comment 38•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #37)
> (In reply to Joe Walker [:jwalker] from comment #28)
> > > Other that this, do I assume it has an r+ overall ?
> >
> > I'd like to spend a bit more time on storage.js, and have another play, but
> > we're nearly there. Hopefully, I'll get this done today.
>
> I've had another look, and I'd still like to see it again with better
> comments. FWIW a big consumer of source comments is the original reviewer,
> so I think in general it's a good idea to get those in place before asking
> for an r?
Can you point out where all is a need for more comments. I was pretty thorough in putting comments in this patch wherever possible..
> As far as landing plans go - I'm OK with landing this preffed off (and
> invisible using the options panel), in fact I think we should do this to
> prevent bitrot.
The actors can go as is. The frontend will be disable via a killSwitch pref so that its not visible even in the options panel.
Comment 39•11 years ago
|
||
Comment on attachment 8379843 [details] [diff] [review]
patch v0.5
Review of attachment 8379843 [details] [diff] [review]:
-----------------------------------------------------------------
There's code here that looks like it's never been executed, so I'm renewing my call for more tests.
::: toolkit/devtools/server/actors/storage.js
@@ +37,5 @@
> +let storageTypePool = new Map();
> +
> +/**
> + * Gets an accumulated list of all storage actors registered to be used to
> + * create a RetVal
* create a RetVal, for example in StorageActor.listStores
? Otherwise it's just a random disconnected function
@@ +484,5 @@
> + }
> + return cookies;
> + },
> +
> + observe: function(subject, topic, action) {
Could you document these parameters?
@@ +568,5 @@
> + this.storageActor.update("cleared", "cookies");
> + break;
> +
> + case "reload":
> + this.storageActor.update("relaod", "cookies");
"reloaded"?
@@ +709,5 @@
> + return this.childWindowPool;
> + },
> +
> + /**
> + * List of solicit event notifications that the server can send to the client.
'solicit'? Can we just delete that word?
@@ +711,5 @@
> +
> + /**
> + * List of solicit event notifications that the server can send to the client.
> + *
> + * - storage-update : When any store object in any storage type changes.
stores-update?
@@ +805,5 @@
> + return null;
> + }
> + let window = docShell.contentViewer.DOMDocument.defaultView;
> + // TODO - figure out this use case. Some times, a normal url-ed window also
> + // has href as about:blank when it is unloaded.
TODO: Probably needs a bug and a BUG XXXXXX marker
@@ +837,5 @@
> + }
> + // else if (topic == "dom-window-destroyed" &&
> + // this.childWindowPool.delete(window)) {
> + // events.emit(this, "window-destroyed", window);
> + // }
Commented out code - why?
@@ +921,5 @@
> + // throw new Error();
> + // }
> + // catch (ex) {
> + // console.log(action, storeType, data, this.boundUpdate, ex.stack);
> + // }
This shouldn't be here
Assignee | ||
Comment 40•11 years ago
|
||
- Addressed all review comments.
- Figured out some edge cases and other TODO comments' solutions. Big thanks to smaug for helping me out with the window-observer.
- Added additional information for cookies
- Adding more tests now. will attach a patch tomorrow.
Attachment #8379843 -
Attachment is obsolete: true
Assignee | ||
Comment 41•11 years ago
|
||
Added tests for test whether:
- reloading/addition/deletion of windows/iframes works properly
- storage changes [cookies/localStorage/sessionStorage changes] are reflected properly.
On going try: https://tbpl.mozilla.org/?tree=Try&rev=9a2a8b3192ae
Attachment #8384848 -
Attachment is obsolete: true
Attachment #8388235 -
Flags: review?(jwalker)
Assignee | ||
Comment 42•11 years ago
|
||
(I am looking into the intermittents happening on debug machines. Please feel free to review the current patch and I will keep this bug posted with newer trys attempting to fix the intermittents)
Comment 43•11 years ago
|
||
Comment on attachment 8388235 [details] [diff] [review]
patch v1.0
Review of attachment 8388235 [details] [diff] [review]:
-----------------------------------------------------------------
Noticed something that could be important about ports for cookies...
r+ with these 3 things fixed, but I'd like to know the conclusion to the storage/cookie/port issue.
::: toolkit/devtools/server/actors/storage.js
@@ +645,5 @@
> + }
> + return location.protocol + "//" + location.hostname;
> + },
> +
> + populateStoresForHost: function(host, window) {
What's the host param for? It doesn't look used?
@@ +695,5 @@
> +
> + /**
> + * Given a url, correctly determine its protocol + hostname part.
> + */
> + getHostFromURL: function(url) {
This doesn't actually get the host. How about 'getSchemeAndHost(...)' ?
Also I think the logic here is wrong isn't it? For cookies the port isn't important, but localStorage and sessionStorage follow the origin rules properly so the port is important.
Attachment #8388235 -
Flags: review?(jwalker) → review+
Assignee | ||
Comment 44•11 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #43)
> Comment on attachment 8388235 [details] [diff] [review]
> patch v1.0
>
> Review of attachment 8388235 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Noticed something that could be important about ports for cookies...
> r+ with these 3 things fixed, but I'd like to know the conclusion to the
> storage/cookie/port issue.
Thanks :)
> ::: toolkit/devtools/server/actors/storage.js
> @@ +645,5 @@
> > + }
> > + return location.protocol + "//" + location.hostname;
> > + },
> > +
> > + populateStoresForHost: function(host, window) {
>
> What's the host param for? It doesn't look used?
You are right, I should actually be using it instead of calculating the host again.
> @@ +695,5 @@
> > +
> > + /**
> > + * Given a url, correctly determine its protocol + hostname part.
> > + */
> > + getHostFromURL: function(url) {
>
> This doesn't actually get the host. How about 'getSchemeAndHost(...)' ?
Yeah, its not just host, but scheme. Will rename.
> Also I think the logic here is wrong isn't it? For cookies the port isn't
> important, but localStorage and sessionStorage follow the origin rules
> properly so the port is important.
Correct again.
Will add port (and hide the port if its 80) alongside the protocol + hostname part .
Assignee | ||
Comment 45•11 years ago
|
||
trying to fix the errors happening in slow machines : https://tbpl.mozilla.org/?tree=Try&rev=fc434c319538
Assignee | ||
Comment 46•11 years ago
|
||
latest try is green : https://tbpl.mozilla.org/?tree=Try&rev=922d4fb32037
Joe, should I go ahead and land this or should we wait for the merge ?
Comment 47•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #46)
> Joe, should I go ahead and land this or should we wait for the merge ?
Several oranges there, but if you're sure they're not related, then go ahead and land.
Assignee | ||
Comment 48•11 years ago
|
||
Yup, they are mostly existing intermittents, and some of them also have been fixed already in the tip. I will rebase the patch on latest fx-team tip and again pass it through full try before landing.
Assignee | ||
Comment 49•11 years ago
|
||
addressed comments from last review.
final try : https://tbpl.mozilla.org/?tree=Try&rev=9395fa796e26
Attachment #8388235 -
Attachment is obsolete: true
Attachment #8389297 -
Flags: review+
Assignee | ||
Comment 50•11 years ago
|
||
and for some reason, neither bugzilla interdiff nor http://benjamin.smedbergs.us/interdiff/ are working for the small interdiff b/w v1 and v1.1 . The only thing close that I can get is : http://diffchecker.com/ctx6gifq
Assignee | ||
Comment 51•11 years ago
|
||
landed in fx-team with minor info() call string changes in one test - https://hg.mozilla.org/integration/fx-team/rev/0dd61eada6c9
Whiteboard: [storage] → [storage][fixed-in-fx-team]
Comment 52•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [storage][fixed-in-fx-team] → [storage]
Target Milestone: --- → Firefox 30
Updated•11 years ago
|
QA Whiteboard: [qa-]
Assignee | ||
Comment 53•10 years ago
|
||
mass component move . filter on #MassComponentMoveStorageInspector
Component: Developer Tools → Developer Tools: Storage Inspector
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•