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

RESOLVED FIXED in mozilla1.9.3a1

Status

()

Toolkit
Places
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: John J. Barton, Assigned: timeless)

Tracking

Trunk
mozilla1.9.3a1
Points:
---
Bug Flags:
blocking1.9.2 -

Firefox Tracking Flags

(status1.9.2 beta3-fixed, status1.9.1 .8-fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
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)

Updated

8 years ago
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)
(Assignee)

Comment 1

8 years ago
Created attachment 410483 [details] [diff] [review]
patch
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+
(Reporter)

Comment 3

8 years ago
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.
(Reporter)

Comment 5

8 years ago
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.
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/7dac283e2028
Status: ASSIGNED → RESOLVED
Last Resolved: 8 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+

Updated

8 years ago
Keywords: checkin-needed
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/4ca2f1951447
status1.9.2: --- → final-fixed
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+
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/459c9734217d
status1.9.1: --- → .8-fixed
You need to log in before you can comment on or make changes to this bug.