Set onExceptionUnwind once
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Existing codebase in ThreadActor is toggling the Debugger API's onExceptionUnwind
many times:
- nullified on will-navigate, so when we start navigating to a new top level document
- set again, if we are pausing on exception, on window-ready for top level document. Here we revert the nullification we just did in the first bullet point.
- nullified when hitting a breakpoint, so that we aren't calling onExceptionUnwind listener while breaking and stepping
- restored on resume, if we were pausing on exception. We revert what we did on previous bullet point.
I believe the first two bullet points are clearly legacy and not useful and may be even source of missed exception!
For the disabling while breaking and stepping, it may make sense, but I'm not able to reproduce a case where onExceptionUnwind is called while paused.
So we may get rid of all that, and only set onExceptionUnwind once, when we enable pause on exception. And nullify it only when we disable pause on exception.
Assignee | ||
Comment 1•3 years ago
|
||
Stop unregistering onExceptionUnwind on navigation (will-navigate) and pauses.
So that we no longer have to re-register it on window-ready and resume.
Instead, only check that we aren't paused when processing an exception.
Regarding navigation, I don't think we want to ignore any exception during the process of navigating to another page.
I would rather say we want to catch anything that happen during this process!
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3eafc02dd3a5 [devtools] Register onExceptionUnwind only once. r=nchevobbe
Updated•3 years ago
|
Comment 3•3 years ago
|
||
bugherder |
Description
•