Closed
Bug 1644992
Opened 5 years ago
Closed 5 years ago
JSWindowActorProtocol::Observe should report a browser console error / warning if the subject isn't an inner/outer window
Categories
(Core :: DOM: Content Processes, defect, P3)
Core
DOM: Content Processes
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: Gijs, Assigned: nika)
Details
Attachments
(1 file, 1 obsolete file)
Current code is:
nsCOMPtr<nsPIDOMWindowInner> inner = do_QueryInterface(aSubject);
RefPtr<WindowGlobalChild> wgc;
if (!inner) {
nsCOMPtr<nsPIDOMWindowOuter> outer = do_QueryInterface(aSubject);
if (NS_WARN_IF(!outer) || NS_WARN_IF(!outer->GetCurrentInnerWindow())) {
return NS_ERROR_FAILURE;
}
wgc = outer->GetCurrentInnerWindow()->GetWindowGlobalChild();
} else {
wgc = inner->GetWindowGlobalChild();
}
if (NS_WARN_IF(!wgc)) {
return NS_ERROR_FAILURE;
}
The observer service will swallow the NS_ERROR_FAILURE
, so failure is mostly silent except on debug builds, where I think warnings are likely to get lost in the rest of the stdout/stderr maelstrom.
I think we should report an error in the console service with the actor name and observer topic, so we're more likely to notice / understand why the observer interaction with the child actor "doesn't work".
Comment 1•5 years ago
|
||
This is a feature request from Frontend team.
Tracking for Fission Nightly M6b
Severity: -- → S3
Fission Milestone: --- → M6b
Priority: -- → P3
Updated•5 years ago
|
Fission Milestone: M6b → M6c
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → nika
Assignee | ||
Comment 3•5 years ago
|
||
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/886855bf6308
Report an error for non-window topic observed by JSWindowActorProtocol, r=kmag
Comment 5•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox82:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Updated•5 years ago
|
Attachment #9163827 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•