Closed Bug 1299344 Opened 8 years ago Closed 6 years ago

Handler function DebuggerProgressListener.prototype.onStateChange threw an exception (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]

Categories

(DevTools :: General, defect, P3)

48 Branch
defect

Tracking

(firefox63 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox63 --- verified

People

(Reporter: robwu, Assigned: ochameau)

References

Details

Attachments

(1 file)

Tested with Firefox 48 and Nightly 51 (with e10s disabled).

STR:
1. Open a popup that closes itself at the window.onload event:
   window.open('data:text/html,<body onload=close()>');
2. Look at the global error console.

Expected:
- No messages

Actual (this only happens in non-e10s):
The console shows the following two errors. Note that this only happens when the popup is closed during the onload event. The errors do not appear when I schedule a close in a microtask or close when the window has just opened.

Handler function DebuggerProgressListener.prototype.onStateChange threw an exception: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js :: _docShellsToWindows/< :: line 1378"  data: no]
Stack: _docShellsToWindows/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js:1378:11
_docShellsToWindows@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js:1375:12
_notifyDocShellsUpdate@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js:1406:19
DebuggerProgressListener.prototype.onStateChange<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js:2495:7
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
Line: 1378, column: 0

Handler function DebuggerProgressListener.prototype.onStateChange threw an exception: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]"  nsresult: "0x80004002 (NS_NOINTERFACE)"  location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js :: DebuggerProgressListener.prototype.onStateChange< :: line 2498"  data: no]
Stack: DebuggerProgressListener.prototype.onStateChange<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/webbrowser.js:2498:9
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
Line: 2498, column: 0
I noticed these error occurring constantly under the browser console when I was going through the latest blocklist in bug#1363513.

>> Actual (this only happens in non-e10s)

The issue is reproducible with with e10s using the STR mentioned below with the latest fx55.0a1, buildid: 20170511063838, changeset: 838652a84b76.

STR (used a clean profile every time)

* install/launch fx
* visit http://www.adobe.com/software/flash/about/
* open the browser console via the Hamburger Menu -> Developer -> Browser Console

You'll see the error messages Rob mentioned in comment#0.

Platforms:
* macOS 10.12.4 x64 - Reproduced
* Win 10 Pro x64 VM - Reproduced
* Ubuntu 16.04.2 LTS x64 VM - Reproduced
Product: Firefox → DevTools
See Also: → 1026583
Comment on attachment 8998868 [details]
Bug 1299344 - Fix exceptions when accessing DOMWindow and contentCharset when reload page against the netmonitor. r=Honza

Jan Honza Odvarko [:Honza] has approved the revision.
Attachment #8998868 - Flags: review+
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e906e53dd6ba
Fix exceptions when accessing DOMWindow and contentCharset when reload page against the netmonitor. r=Honza
https://hg.mozilla.org/mozilla-central/rev/e906e53dd6ba
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Flags: qe-verify+
This issue no longer reproducible for me using steps from comment#1 and steps from comment#0, didn't seen  any error message mentioned in comment#0 in browser console. I verified on Fx 62.0b12 on Windows 10 x64 and Ubuntu 18.04 x64, didn't seen any error message mentioned in comment#0 in browser console.
Rob, could you help and confirm the verification on Fx 63.0b12?
Flags: needinfo?(rob)
Verified as fixed, as follows:

1. Visit about:config and set the following prefs:
browser.tabs.remote.autostart = false
security.data_uri.block_toplevel_data_uri_navigations = false

2. Restart Firefox, open example.com
3. Open Devtools for the tab and run the following:
   window.open('data:text/html,<body onload=close()>');
4. The popup blocker kicks in, click on the Preferences > Show 'data:text/html,<body onload=close()>' menu item.
5. Repeat step 4 a couple of times.
6. Look at the global JS console (Ctrl-Shift-J)

When I run the above steps in Firefox 62.0.3, the error from comment 0 appears.
When I run the above steps in Firefox 63.0b12, the error does not appear.
Status: RESOLVED → VERIFIED
Flags: needinfo?(rob)
Thanks Rob.
I have reproduced this issue using Firefox 62.0 on Windows 10 x64.
I can confirm this issue is fixed, I verified using Firefox 63.0b12 on Ubuntu 18.04 x64, Windows 10 x64 and Mac OS X 10.13.
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: