Closed Bug 1769982 Opened 3 years ago Closed 3 years ago

Devtools window actor throws exceptions when docshell is being destroyed

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mhoye, Assigned: ochameau)

Details

Attachments

(2 files)

Attached image image.png

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.

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.

Alex reproduced the issue, will look into this.

Severity: -- → S3
Flags: needinfo?(poirot.alex)
Priority: -- → P2

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.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/02eb2db5ef94 [devtools] Ignore all requests once the target actor starts being destroyed. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Summary: "Devtools window actor throws exceptions when docshell is being destroyed → Devtools window actor throws exceptions when docshell is being destroyed
Flags: needinfo?(poirot.alex)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: