Open
Bug 732593
Opened 13 years ago
Updated 3 years ago
mTabProgressListener onStateChange error if iframe onload moves the iframe
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file)
310 bytes,
text/html
|
Details |
Loading the testcase triggers:
JavaScript error: , line 0: uncaught exception: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: chrome://browser/content/tabbrowser.xml :: <TOP_LEVEL> :: line 545" data: no]
Seems to be this line:
http://hg.mozilla.org/mozilla-central/annotate/343ec916dfd5/browser/base/content/tabbrowser.xml#l549
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Comment 1•13 years ago
|
||
http://mxr.mozilla.org/comm-central/search?string=.DOMWindow&case=on&filter=DOMWindow\b
Hardly anywhere do we expect DOMWindow to throw. Can it return null instead? Alternatively, can nsIWebProgress get a flag for whether it relates to a top-level window?
I have encountered the same problem today. I was directly doing something in a function that called from onload() of an iframe.
In an iframe:
window.onload=function() { parent.aFunctionOnParent(); }
In parent:
function aFunctionOnParent() { codes... }
Then I have used setTimeOut and then worked without exception. These changes fixed my problem:
function aFunctionOnParent() { setTimeOut(){ function() { codes... }, 1} }
Reporter | ||
Comment 3•12 years ago
|
||
Still happens on trunk.
http://hg.mozilla.org/mozilla-central/rev/a8a547fb44a8 changed the error message to:
JavaScript error: chrome://browser/content/tabbrowser.xml, line 562: NS_NOINTERFACE: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.isTopLevel]
Comment 4•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #1)
> Hardly anywhere do we expect DOMWindow to throw. Can it return null instead?
I guess this would be relatively simple to implement. But I wonder whether it would instead be better to suppress firing web progress notifications in the cases where it would return null.
Comment 5•12 years ago
|
||
Bug 866748 filed for the case that is affecting tabbrowser. I guess we can maybe morph this into the more general case of "what should the nsIWebProgressListener behavior be" in this situation?
Updated•8 years ago
|
Has Regression Range: --- → no
status-firefox56:
--- → wontfix
status-firefox57:
--- → wontfix
status-firefox58:
--- → fix-optional
status-firefox-esr52:
--- → wontfix
Comment 6•8 years ago
|
||
status-firefox59:
--- → ?
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•