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)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: neil)

Details

Attachments

(2 files)

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 on attachment 137396 [details] [diff] [review] only handle events for top level windows Um... documents have a contentWindow property?
This changes the way notifyListeners is set to avoid the problem.
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-
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
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 on attachment 137424 [details] [diff] [review] Alternate approach r=varga
Attachment #137424 - Flags: review?(varga) → review+
This got merged into the fix for bug 225854.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: