Closed Bug 526709 Opened 15 years ago Closed 15 years ago

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

Categories

(Toolkit :: Places, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta3-fixed
status1.9.1 --- .8-fixed

People

(Reporter: johnjbarton, Assigned: timeless)

Details

Attachments

(1 file)

Every time I run firefox I get an uncaught exception error in file:///C:/mozilla/firefox-3.6b1pre.en-US.win32/firefox/modules/utils.js line 128. The problem is not on that line however. The bug is in nsLivemarkService.js. I set statement debugger; 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 {986c11d0-f340-11d4-9075-0010a4e73d9a} 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
Status: NEW → ASSIGNED
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 patch (deleted) — Splinter Review
Attachment #410483 - Flags: review?(dietrich)
Comment on attachment 410483 [details] [diff] [review] patch 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.
Status: ASSIGNED → RESOLVED
Closed: 15 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] patch i suppose would be cool and not too much of a problem getting this on 1.9.1.7
Attachment #410483 - Flags: approval1.9.1.7?
Comment on attachment 410483 [details] [diff] [review] patch Approved for 1.9.1.8, 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.

Attachment

General

Creator:
Created:
Updated:
Size: