Add break on cookie change
Categories
(DevTools :: Storage Inspector, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: miker, Unassigned)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [polish-backlog][todo-mr][t2])
Updated•11 years ago
|
Updated•10 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
Updated•9 years ago
|
Updated•8 years ago
|
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I was having a look at Firebug's code again in order to get to know how it worked there.
The logic there was basically like this:
- Listen for the
cookie-changed
event of the nsIObserver interface (like the Storage Inspector does). - Call the panel-specific logic to stop the script execution.
- Check whether there's a breakpoint set.
- Call the general logic to stop the script execution.
- Stop at the currently executed stack frame.
As far as I can see, there is no direct connection between the cookie-changed
event and the executed JavaScript statement, which might be a problem in the Fission-enabled world. So there could be the need to attach some stack frame related information to that event.
Honza, if I remember correctly, you were deeply involved in the debugger and Cookies panel code back then, so maybe you can tell more about this and whether there is a direct connection between those which can be used to implement this.
(This information will also be required for bug 1350812.)
Sebastian
Comment 2•4 years ago
|
||
Ah, I recall that code :-)
I think you summarized that pretty well.
As far as I can see, there is no direct connection between the cookie-changed event and the executed JavaScript statement,
If JS stack was available when we were handling "cookie-changed" event (i.e. the change was originated in JS) it was possible to break in the newest JS frame using Firebug.Breakpoint.breakNow - that how it worked back then - since the event was synchronous. Of course this might be different now when Fission is in place.
In any case, in order to implement this we need synchronous "change" event ensuring that the current JS stack is still available and we can pause JS execution at the very moment when cookie change is happening. Similarly to what we do for Break on XHR.
Honza
Updated•2 years ago
|
Description
•