Devtools window actor throws exceptions when docshell is being destroyed
Categories
(DevTools :: General, defect, P2)
Tracking
(firefox102 fixed)
| Tracking | Status | |
|---|---|---|
| firefox102 | --- | fixed |
People
(Reporter: mhoye, Assigned: ochameau)
Details
Attachments
(2 files)
I'm not sure what's going on here, but I've got an endless wall of identical errors here all of which reference GDocs, and all of which report the same error (visible in the attached screenshot).
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDocShell.domWindow]
"Devtools window actor throws exceptions when docshell is being destroyed" is how Gijs describes it.
Comment 1•3 years ago
|
||
This is from the GetDOMWindow getter, so must be coming from this line, which probably means that one of these is failing.
The calling code can check docShell.isBeingDestroyed() and avoid these, or add a try..catch so the network monitoring code doesn't break if the window for a request is being destroyed.
Comment 2•3 years ago
|
||
https://searchfox.org/mozilla-central/rev/8fe6930c0832009b3162bebee7d4ede1a4c8c9a8/devtools/server/actors/network-monitor/utils/network-utils.js#373 is the devtools callsite for https://searchfox.org/mozilla-central/rev/8fe6930c0832009b3162bebee7d4ede1a4c8c9a8/devtools/server/actors/targets/window-global.js#418-423 (which can already return null so should probably just do the same thing in this case)
Comment 3•3 years ago
|
||
Alex reproduced the issue, will look into this.
| Assignee | ||
Comment 4•3 years ago
|
||
We weren't really using the window attribute.
Also I didn't want to add the extra cost of calling docShell.isBeingDestroyed()
in the hot codepath of WindowGlobalTargetActor.window.
This exception may highlight that resource watchers aren't destroyed soon enough.
Updated•3 years ago
|
Comment 6•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
Description
•