Closed Bug 338817 Opened 18 years ago Closed 18 years ago

Safebrowsing: Each new window gives about 30 undefined properties in nsUrlClassifierLib.js

Categories

(Toolkit :: Safe Browsing, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: u88484, Assigned: tony)

Details

(Keywords: verified1.8.1)

Attachments

(1 file, 1 obsolete file)

Warning: reference to undefined property fn.boundArgs_
Source file: file:///C:/Program%20Files/firefox/components/nsUrlClassifierLib.js
Line: 421
Warning: reference to undefined property fn.boundSelf_
Source file: file:///C:/Program%20Files/firefox/components/nsUrlClassifierLib.js
Line: 424
Warning: reference to undefined property fn.boundFn_
Source file: file:///C:/Program%20Files/firefox/components/nsUrlClassifierLib.js
Line: 428
and so on...
WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060522 Minefield/3.0a1 ID:2006052205 [cairo], no such warnings
Make sure you have set the prefs javascript.options.strict and javascript.options.showInConsole to true.
(In reply to comment #2)
> Make sure you have set the prefs javascript.options.strict and
> javascript.options.showInConsole to true.
OK those are strict warning and I had javascript.options.strict=false.

Attached patch v1: inline IsDef checks in bind (obsolete) — Splinter Review
This gets rid of the warnings on new browser windows, which seems like a good idea because that's pretty noisy.

However, there are still some places in the code that uses the isDef function to check to see if something is defined and they will also trigger the warning.  I'm not sure if the function should be completely removed and inlined with (typeof foo != "undefined") everywhere.
Assignee: nobody → tony
Status: NEW → ASSIGNED
Tony, did you mean to ask for review on that patch, and maybe stop spewing in our consoles? ;)
I had meant to go back and remove ifDef completely.  New patch should address that.
Attachment #222966 - Attachment is obsolete: true
Attachment #223738 - Flags: review?(darin)
Attachment #223738 - Flags: approval-branch-1.8.1?(darin)
Comment on attachment 223738 [details] [diff] [review]
v2: remove ifDef everywhere

ok, but why does this cause the warnings?
Attachment #223738 - Flags: review?(darin)
Attachment #223738 - Flags: review+
Attachment #223738 - Flags: approval-branch-1.8.1?(darin)
Attachment #223738 - Flags: approval-branch-1.8.1+
(In reply to comment #7)
> (From update of attachment 223738 [details] [diff] [review] [edit])
> ok, but why does this cause the warnings?

Passing undefined into a function triggers the warning.

Fixed on branch and trunk.

Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Keywords: verified1.8.1
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: