Closed Bug 428358 Opened 18 years ago Closed 18 years ago

Typo in <malware-warden.js> causes xpconnect exception: "streamCompleted" -> "streamFinished"

Categories

(Toolkit :: Safe Browsing, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(2 files)

Now that we have error messages from JS components again (bug 415498) I'm seeing this in the console on startup: [Exception... "'JavaScript component does not have a method named: "streamFinished"' when calling method: [nsIUrlClassifierUpdateObserver::streamFinished]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "<unknown>" data: no] Looks like there's a typo in malware-warden.js: http://lxr.mozilla.org/seamonkey/source/browser/components/safebrowsing/content/malware-warden.js#86 Should be streamFinished, not streamCompleted, and it has an nsresult argument. Patch attached.
Attachment #314906 - Flags: review?(dcamp)
Attachment #314906 - Flags: review?(dcamp) → review+
Comment on attachment 314906 [details] [diff] [review] Patch [Checkin: Comment 4] Simple risk-free typo fix that eliminates a startup error in the JS console.
Attachment #314906 - Flags: approval1.9?
Comment on attachment 314906 [details] [diff] [review] Patch [Checkin: Comment 4] a1.9=beltzner
Attachment #314906 - Flags: approval1.9? → approval1.9+
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008041107 Minefield/3.0pre] (nightly) (W2Ksp4) (Confirming:) 1. Load application. (any profile)
Summary: Typo in malware-warden.js causes xpconnect exception → Typo in <malware-warden.js> causes xpconnect exception about "streamFinished"
Target Milestone: --- → Firefox 3
Fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Serge: Please don't add checkin-needed to a bug where the patch author has CVS access unless he/she has specifically requested that somebody land his/her patch(es). If you didn't know that bent has CVS access, that's fine, but please just note it for the future. :)
Well, shouldn't this also be fixed at http://lxr.mozilla.org/seamonkey/source/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js#123 which is where I think this code was copied from in the first place?
(In reply to comment #6) > Well, shouldn't this also be fixed at Right ! Thanks for noticing. 3 good files: <http://mxr.mozilla.org/mozilla/search?string=streamFinished&tree=mozilla> 2 bad files: (before this bug) <http://mxr.mozilla.org/seamonkey/search?string=streamCompleted&tree=seamonkey>
Summary: Typo in <malware-warden.js> causes xpconnect exception about "streamFinished" → Typo in <malware-warden.js> causes xpconnect exception: "streamCompleted" -> "streamFinished"
Copy fix from <malware-warden.js> patch.
Attachment #315198 - Flags: review?(tony)
Please file new bugs for new patches. It makes tracking very difficult otherwise :)
Attachment #315198 - Flags: review?(tony)
Attachment #315198 - Flags: review?(dcamp)
Attachment #315198 - Flags: review+
Attachment #314906 - Attachment description: Patch → Patch [Checkin: Comment 4]
(In reply to comment #10) > Please file new bugs for new patches. It makes tracking very difficult > otherwise :) Well, what I did not do in this case is to reopen this bug... even though I fully agree with Bill that the two files have this very bug.
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008041204 Minefield/3.0pre] (FX-WIN32-TBOX-trunk) (W2Ksp4) V.Fixed, for the Firefox occurrence.
Status: RESOLVED → VERIFIED
I fixed the same problem in the test: mozilla/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js 1.11
Attachment #315198 - Attachment is obsolete: true
Attachment #315198 - Flags: review?(dcamp)
(In reply to comment #13) > I fixed the same problem in the test: > mozilla/toolkit/components/url-classifier/tests/unit/head_urlclassifier.js > 1.11 This checkin fixed the function name; but you still miss the |status| parameter, don't you ?
Attachment #315198 - Attachment description: (Bv1) <head_urlclassifier.js> → (Bv1) <head_urlclassifier.js> [Checkin: See omment 13]
Attachment #315198 - Attachment description: (Bv1) <head_urlclassifier.js> [Checkin: See omment 13] → (Bv1) <head_urlclassifier.js> [Checkin: See comment 13]
Attachment #315198 - Attachment is obsolete: false
Yeah, fixed that too. Doesn't matter too much since the function parameters aren't checked anyways.
(In reply to comment #15) > Yeah, fixed that too. Doesn't matter too much since the function parameters > aren't checked anyways. (Agreed. But it can't hurt to have it the right way ;-))
Attachment #315198 - Attachment description: (Bv1) <head_urlclassifier.js> [Checkin: See comment 13] → (Bv1) <head_urlclassifier.js> [Checkin: See comment 13 & 15]
Attachment #315198 - Attachment description: (Bv1) <head_urlclassifier.js> [Checkin: See comment 13 & 15] → (Bv1) <head_urlclassifier.js> [Checkin: See comment 13+15]
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: