Closed Bug 526709 Opened 11 years ago Closed 11 years ago

LS_QueryInterface throws the wrong exception (NS_ERROR_NOT_IMPLEMENTED) instead of (NS_ERROR_NO_INTERFACE)


(Toolkit :: Places, defect)

Not set



Tracking Status
status1.9.2 --- beta3-fixed
status1.9.1 --- .8-fixed


(Reporter: johnjbarton, Assigned: timeless)



(1 file)

Every time I run firefox I get an uncaught exception error in 
line 128.
The problem is not on that line however. The bug is in nsLivemarkService.js.

I set statement
on line 842, the first line of LS_QueryInterface. Then run Firefox and Chromebug breaks on line 842. By single stepping I can see the service creation pass through LS_QueryInterface a number of times. Eventually it gets call with aIID
which is nsIClassInfo. On that call the QI issues 
    throw Cr.NS_ERROR_NOT_IMPLEMENTED; // 2147500033

Based on this I am pretty sure that the uncaught exception is caused by this throw. Most users do not see this because the XPCOM layer does not report exceptions for some (dubious) historical reason.

However to debug extensions we need to watch for all exceptions and this one is just noise, in addition to being a bug, but consequences I am uncertain.

So either livemark-service;2 needs to implment nsIClassInfo or the getService needs to not ask for it.

See also Bug 499568
Assignee: nobody → timeless
Component: General → Places
Product: Core → Toolkit
QA Contact: general → places
Summary: uncaught exception: 2147500033 on line 128 util.js every time I run Firefox → LS_QueryInterface throws the wrong exception (NS_ERROR_NOT_IMPLEMENTED) instead of (NS_ERROR_NO_INTERFACE)
Attached patch patchSplinter Review
Attachment #410483 - Flags: review?(dietrich)
Comment on attachment 410483 [details] [diff] [review]

while this is correct, i'll file a bug to convert it to use XPCOMUtils unless someone has anything against that.
Attachment #410483 - Flags: review?(dietrich) → review+
I just want to check: I guess this change will cause getService to trap the throw? That is, this will fix the problem I see, not just change the error number?
GetInterface and QueryInterface should never report a NS_ERROR_NO_INTERFACE but will report others.
Requesting blocking so that this issue is evaluated, given that the call occurs on every startup of firefox and the fix is small.
Flags: blocking1.9.2?
filed bug 526777 about XPCOMUtils

this probably doesn't block, but once it's on trunk will be easy to get approval.
Closed: 11 years ago
Keywords: checkin-needed
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
notice in bug 526777 i've moved this code to XPCOMUtils, in case that would cause problems please contact me.

that means this code has been replaced on trunk, but we should take this patch on branches.
Sucks, will gladly approve the fix, but wouldn't hold the release of Firefox 3.6 if this were the last bug.
Flags: blocking1.9.2? → blocking1.9.2-
Attachment #410483 - Flags: approval1.9.2+
Keywords: checkin-needed
Comment on attachment 410483 [details] [diff] [review]

i suppose would be cool and not too much of a problem getting this on
Attachment #410483 - Flags: approval1.9.1.7?
Comment on attachment 410483 [details] [diff] [review]

Approved for, a=dveditz for release-drivers
Attachment #410483 - Flags: approval1.9.1.8? → approval1.9.1.8+
You need to log in before you can comment on or make changes to this bug.