Closed Bug 111404 Opened 23 years ago Closed 16 years ago

javascript strict warnings in tabbrowser.xml

Categories

(SeaMonkey :: Tabbed Browser, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
mozilla1.1alpha

People

(Reporter: bugzilla, Unassigned)

References

Details

Attachments

(1 file)

I'm getting this in the console: Warning: reference to undefined property this.parentNode.updateCurrentBrowser http://lxr.mozilla.org/mozilla/search?string=updateCurrentBrowser show that updateCurrentBrowser is only defined in tabbrowser.xml http://lxr.mozilla.org/mozilla/source/xpfe/global/resources/content/bindings/tabbrowser.xml 20011112
This is not a duplicate of bug 102184. I just removed all the warnings described in bug 102184, but this warning keeps occuring. The easiest way to reproduce the warning: 1.) Start mozilla 2.) Press Ctrl-T 3.) Press Ctrl-N 4.) Open JavaScript console
OS: Windows 2000 → All
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1
I don't see this in Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.7+) Gecko/20020108
The js console is almost getting flooded with: Warning: reference to undefined property this.parentNode.updateCurrentBrowser It's 100% from tabbrowser.xml. The evidence: http://lxr.mozilla.org/seamonkey/search?string=updateCurrentBrowser build 20020115 to reproduce: just start a new window...
Summary: warning in tabbrowser.xml → javascript strict warnings in tabbrowser.xml
Why is that a warning and not an error? The only references I see in the lxr page are calls to the method, not tests for the property's value being non-false. /be
Starting a new browser window, I do NOT get this as a strict warning or an error. WFM Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.7+) Gecko/20020115
Now I algo got: Warning: reference to undefined property b.webProgress Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.addTab() Line: 66 Error: b.webProgress has no properties Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.addTab() Line: 66 Error: document.getAnonymousElementByAttribute(this, "anonid", "headerValue") has no properties Source File: chrome://messenger/content/mailWidgets.xml#mail- headerfield.headerValue (setter) Line: 0 Warning: reference to undefined property this.mTabListeners [this.mPanelContainer.selectedIndex] Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.updateCurrentBrowser () Line: 21 Warning: reference to undefined property this.mTabListeners[index] Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.removeTab() Line: 28 Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIWebProgress.removeProgressListener]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.removeTab() :: removeTab :: line 28" data: no]
Reassigning to new component owner.
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW
QA Contact: blaker → sairuh
this warning: "Warning: reference to undefined property this.parentNode.updateCurrentBrowser" is flooding my console... isn't everybody seeing this warning? 20020205
I'm seeing this. For some reason the tabbox gets onselect-event before tabbrowser is constructed. So the following removes the warning --- xpfe/global/./resources/content/bindings/tabbrowser.xml.bak Wed Apr 10 18:59:17 2002 +++ xpfe/global/./resources/content/bindings/tabbrowser.xml Wed Apr 10 20:30:25 2002 @@ -51,7 +51,7 @@ <content> <xul:stringbundle src="chrome://global/locale/tabbrowser.properties"/> <xul:tabbox flex="1" - onselect="if (event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();"> + onselect="if ( !('updateCurrentBrowser' in this.parentNode) || event.target.localName != 'tabpanels') return; this.parentNode.updateCurrentBrowser();"> <xul:hbox class="tabbrowser-strip chromeclass-toolbar" collapsed="true" tooltip="_child" context="_child"> <xul:tooltip onpopupshowing="event.preventBubble(); if (document.tooltipNode.hasAttribute('label')) { this.setAttribute('label', document.tooltipNode.getAttribute('label')); return true; } return false;"/> <xul:menupopup onpopupshowing="this.parentNode.parentNode.parentNode.updatePopupMenu(this);">
Oops, the lines were messed up. "!('updateCurrentBrowser' in this.parentNode)" is the new thing.
Comment on attachment 81776 [details] [diff] [review] smaug's patch as attachment r=biesi
Attachment #81776 - Flags: review+
Comment on attachment 81776 [details] [diff] [review] smaug's patch as attachment sr=alecf
Attachment #81776 - Flags: superreview+
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
removed mozilla completly and reinstalled (20020607). Mozilla came up with the "wanna be default browser". Press ok and saw these in the js console: Warning: reference to undefined property this.mCurrentBrowser.currentURI Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.updateCurrentBrowser() Line: 11 Warning: reference to undefined property this.mCurrentBrowser.webProgress Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.updateCurrentBrowser() Line: 15 Warning: reference to undefined property this.mCurrentBrowser.securityUI Source File: chrome://global/content/bindings/tabbrowser.xml#tabbrowser.updateCurrentBrowser() Line: 16
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
QA Contact: sairuh → pmac
So why was updateCurrentBrowser not a property on this.parentNode? Was that onselect somehow triggered before the xbl binding was completely attached?
*** Bug 197797 has been marked as a duplicate of this bug. ***
Blocks: 296661
Product: Core → SeaMonkey
Assignee: jag → nobody
Status: REOPENED → NEW
QA Contact: pmac → tabbed-browser
WFM: Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1b4pre) Gecko/20090305 SeaMonkey/2.0b1pre
Status: NEW → RESOLVED
Closed: 23 years ago16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: