If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

javascript strict warnings in tabbrowser.xml

RESOLVED WORKSFORME

Status

SeaMonkey
Tabbed Browser
RESOLVED WORKSFORME
16 years ago
9 years ago

People

(Reporter: Henrik Gemal, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
mozilla1.1alpha
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
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
Bug 102184

Comment 2

16 years ago
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

Updated

16 years ago
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
(Reporter)

Comment 4

16 years ago
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
(Reporter)

Comment 7

16 years ago
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]

Comment 8

16 years ago
Reassigning to new component owner.
Assignee: hyatt → jaggernaut
Status: ASSIGNED → NEW

Updated

16 years ago
QA Contact: blaker → sairuh
(Reporter)

Comment 9

16 years ago
this warning:
"Warning: reference to undefined property this.parentNode.updateCurrentBrowser"
is flooding my console...

isn't everybody seeing this warning?

20020205

Comment 10

16 years ago
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);">

Comment 11

16 years ago
Oops, the lines were messed up.
"!('updateCurrentBrowser' in this.parentNode)" is the new thing.
Created attachment 81776 [details] [diff] [review]
smaug's patch as attachment
Comment on attachment 81776 [details] [diff] [review]
smaug's patch as attachment

r=biesi
Attachment #81776 - Flags: review+

Comment 14

16 years ago
Comment on attachment 81776 [details] [diff] [review]
smaug's patch as attachment

sr=alecf
Attachment #81776 - Flags: superreview+
checked in
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
(Reporter)

Comment 16

16 years ago
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

Comment 17

15 years ago
So why was updateCurrentBrowser not a property on this.parentNode? Was that
onselect somehow triggered before the xbl binding was completely attached?
(Reporter)

Comment 18

15 years ago
*** Bug 197797 has been marked as a duplicate of this bug. ***

Updated

10 years ago
Blocks: 296661
(Assignee)

Updated

9 years ago
Product: Core → SeaMonkey
Assignee: jag → nobody
Status: REOPENED → NEW
QA Contact: pmac → tabbed-browser

Comment 19

9 years ago
WFM:
Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1b4pre) Gecko/20090305 SeaMonkey/2.0b1pre
Status: NEW → RESOLVED
Last Resolved: 16 years ago9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.