Closed
Bug 87704
Opened 23 years ago
Closed 23 years ago
JS warnings about winhooks at startup
Categories
(SeaMonkey :: UI Design, defect, P3)
SeaMonkey
UI Design
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.3
People
(Reporter: sfraser_bugs, Assigned: jag+mozilla)
Details
Attachments
(3 files)
957 bytes,
patch
|
Details | Diff | Splinter Review | |
2.19 KB,
patch
|
Details | Diff | Splinter Review | |
2.15 KB,
patch
|
Details | Diff | Splinter Review |
I get these warnings at startup: JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] presumably because the winhooks interface is not present on Mac. Although benign, it would be good to eliminate this warning.
Reporter | ||
Comment 1•23 years ago
|
||
Other new JS warnings in that file: JavaScript strict warning: chrome://navigator/content/navigator.js line 1003: reference to undefined property Components.classes['@mozilla.org/xpcom/leakdetector;1'] JavaScript strict warning: chrome://navigator/content/navigator.js line 1102: reference to undefined property Components.classes['@mozilla.org/urlwidget;1']
Comment 2•23 years ago
|
||
i also see this in my 6/21 linux debug. don't see this w/verif bits.
OS: Mac System 8.5 → All
Hardware: Macintosh → All
Assignee | ||
Updated•23 years ago
|
Priority: -- → P3
Target Milestone: --- → mozilla0.9.3
Comment 3•23 years ago
|
||
Also seen on OpenVMS debug build.
Assignee | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
It's interesting that we're getting so many warnings when there's only one line, which is only called once. Brendan, shaver, any idea why that could be?
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•23 years ago
|
||
Oh, doh, forgot about the leakdetector and urlwidget (that's still in there?). New patch coming up.
Assignee | ||
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
Comment 9•23 years ago
|
||
r=bbaetz
Comment 10•23 years ago
|
||
sr=brendan@mozilla.org /be
Assignee | ||
Comment 11•23 years ago
|
||
Thanks for the sr brendan :-) But do you have any idea why we'd see 11 strict JS warnings for the one same line?
Comment 12•23 years ago
|
||
Sure -- it's a runtime warning. That statement must have executed 11 times. Do you know why that might happen? /be
Assignee | ||
Comment 13•23 years ago
|
||
Well, the code is executed only once. I've modified that function like this: var foopyCount = 0; var barCount = 0; function checkForDefaultBrowser() { foopyCount++; try { Components.classes["@mozilla.org/winhooks;1"] .getService(Components.interfaces.nsIWindowsHooks) .checkSettings(window); } catch(e) { barCount++; } dump("Foopy: "+foopyCount+", bar: "+barCount+"...\n"); } Which results in this chunk of output at startup: JavaScript strict warning: chrome://navigator/content/navigator.js line 1326: reference to undefined property Components.classes['@mozilla.org/winhooks;1'] [Repeat strict warning 10 times, see original post for an example ;-)] Foopy: 1, bar: 1...
Comment 14•23 years ago
|
||
I repeat that the JS engine does not report errors redudantly. Can you debug a bit, see who is? Maybe it's XPConnect. /be
Assignee | ||
Comment 15•23 years ago
|
||
I guess xpconnect. It iterates over a bunch of listeners trying to QI them to an onload listener, the QI fails (it looks for the "QueryInterface" property on the object), which triggers the strict js warning printing code. This apparently just prints out the last warning it got. Let me file a new bug on this :-)
Assignee | ||
Comment 16•23 years ago
|
||
Checked in, marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 17•23 years ago
|
||
i no longer see these warnings with linux moz debug from last night.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•