Closed
Bug 228440
Opened 21 years ago
Closed 21 years ago
Warning ``reference to undefined property this.childNodes[i]'' [xs] in file ``chrome://global/content/bindings/tabbrowser.xml'', line 644, character 0.
Categories
(SeaMonkey :: Tabbed Browser, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: neil)
Details
Attachments
(2 files)
845 bytes,
patch
|
neil
:
review-
|
Details | Diff | Splinter Review |
2.22 KB,
patch
|
janv
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208
Warning ``reference to undefined property this.childNodes[i]'' [xs] in file
``chrome://global/content/bindings/tabbrowser.xml'', line 644, character 0.
Stopped for error handler.
#0: function onLinkAdded(event=Event:{0}) in
<chrome://global/content/bindings/tabbrowser.xml> line 644
642: }
643:
644: notifyListeners = (this.childNodes[i] == tabBrowser.mCurrentBrowser);
645: }
646: else if
(!contentPolicy.shouldLoad(Components.interfaces.nsIContentPolicy.IMAGE,
Sorry, my browser crashed since this, so I really can't give more info :)
Anyway, here's a short view of the code:
632 for (i = 0; i < this.childNodes.length; i++) {
642 }
644 notifyListeners = (this.childNodes[i] == tabBrowser.mCurrentBrowser);
If you ignore the body of the for loop, then it's possible to have an ABR error,
which is what I got.
i triggered this by using tools>translate page on a bugzilla patch. at the same
time i went off and made a new tab.
the translation service is google. the patch came from bugzilla which has a
favicon.
anyway, the core of the problem is that we don't check that the target is a
toplevel window.
this should solve that problem.
Attachment #137396 -
Flags: superreview?(bz-vacation)
Attachment #137396 -
Flags: review?(neil.parkwaycc.co.uk)
Comment 2•21 years ago
|
||
Comment on attachment 137396 [details] [diff] [review]
only handle events for top level windows
Um... documents have a contentWindow property?
Assignee | ||
Comment 3•21 years ago
|
||
This changes the way notifyListeners is set to avoid the problem.
Assignee | ||
Comment 4•21 years ago
|
||
Comment on attachment 137396 [details] [diff] [review]
only handle events for top level windows
contentWindow isn't a property of a document.
Attachment #137396 -
Flags: review?(neil.parkwaycc.co.uk) → review-
Assignee | ||
Updated•21 years ago
|
Attachment #137424 -
Flags: review?(varga)
http://www.mozilla.org/docs/dom/domref/dom_doc_ref.html#1006457
DOM Document Reference
The document Interface
contentWindow*
Returns the window object for the containing window.
--
I'm relying on documentation online.
If it's wrong, please file a bug :). I filed bug 228494 ...
Assignee: timeless → neil.parkwaycc.co.uk
Comment 6•21 years ago
|
||
OK, the alternate patch looks good.
You could have fixed the url.spec in the same time ;)
FYI contentWindow is defined in nsIDOMNSHTMLFrameElement.idl.
Comment on attachment 137396 [details] [diff] [review]
only handle events for top level windows
ok bug 228532 Submitted
Attachment #137396 -
Flags: superreview?(bz-vacation)
Comment 8•21 years ago
|
||
Comment on attachment 137424 [details] [diff] [review]
Alternate approach
r=varga
Attachment #137424 -
Flags: review?(varga) → review+
Assignee | ||
Comment 9•21 years ago
|
||
This got merged into the fix for bug 225854.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•