Closed
Bug 1249435
Opened 9 years ago
Closed 9 years ago
[meta] JS Debugger doesn't pause the debuggee
Categories
(DevTools :: Debugger, defect, P2)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1074448
People
(Reporter: jimb, Unassigned)
References
Details
This is a meta-bug to be blocked by all the cases we find of the JS debugger failing to pause the debuggee.
To preserve run-to-completion semantics, when the DevTools JS debugger has paused a page (at a breakpoint; single-stepping; etc.), all other attempts to run code in the debuggee (event handlers; callbacks; Promise resolutions; etc.) should be delayed until the paused invocation has completed --- even as the devtools JS debugger UI spins a nested event loop to allow its own UI to run, and to provide access to other tabs.
Firefox, or more properly Gecko, provides no single bottleneck for delaying or dropping these invocations. There are many, many reasons the browser may try to invoke JavaScript, and each must be handled in a way that respects its particular requirements. At present, we use nsIDOMWindowUtils' suppressEventHandling and suspendTimeouts, but those don't cover everything.
Reporter | ||
Comment 1•9 years ago
|
||
For bug 912337, Shu has written a patch to implement the Debugger.DebuggeeWouldRun exception, which is thrown when something tries to run code in a paused debuggee. A pref causes this to be merely a warning, not an error; this pref defaults to warning. This patch gives us a way to catch all the cases that the nsIDOMWindowUtils methods aren't handling.
This has already yielded a large list of pause violations. They're just source locations at the moment. If we could get full JS stacks from them, that would be a big step forward in helping us identify violations.
Updated•9 years ago
|
Priority: -- → P2
Comment 2•9 years ago
|
||
We already have a meta bug for tracking where we break run-to-completion semantics; I think we should reuse it here.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 3•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] from comment #2)
> We already have a meta bug for tracking where we break run-to-completion
> semantics; I think we should reuse it here.
Ah, thanks. My search didn't turn that up.
Comment 4•9 years ago
|
||
(In reply to Jim Blandy :jimb from comment #3)
> (In reply to Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] from comment #2)
> > We already have a meta bug for tracking where we break run-to-completion
> > semantics; I think we should reuse it here.
>
> Ah, thanks. My search didn't turn that up.
Run-to-completion was arguably a very bad name for that bug :-P
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•