Closed Bug 398969 Opened 14 years ago Closed 14 years ago

SessionStore: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsICrashReporter.annotateCrashReport]"

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 beta1

People

(Reporter: reed, Assigned: florian)

References

Details

Attachments

(1 file, 1 obsolete file)

In my recent build, I get the following error in the Error Console repeatedly:

SessionStore: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsICrashReporter.annotateCrashReport]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: file:///home/reed/mozilla/builds/mozilla/obj-i686-pc-linux-gnu/dist/bin/components/nsSessionStore.js :: sss_updateCrashReportURL :: line 1946"  data: no]
Flags: blocking-firefox3?
Flags: blocking-firefox3? → blocking-firefox3+
I seem to get this for every tab I open. New location: "JS frame :: file:///home/reed/mozilla/builds/mozilla/obj-i686-pc-linux-gnu/dist/bin/components/nsSessionStore.js :: sss_updateCrashReportURL :: line 1979"
This is because the Breakpad code is built, but not enabled.  The logic in the session store code checks that the interface exists, but it will still try to set the URL if crash reporting is disabled at runtime.  Presumably that "catch (ex) { debug(ex); }" is what causes the console spew.  We could wallpaper over this by removing the debug, or we could actually check, in the catch block, if it's a NS_ERROR_NOT_INITIALIZED (I think you can check that in a JS exception?) and disable the check like the if block above.

(In reply to comment #2)
> we could actually check, in the catch block, if it's a NS_ERROR_NOT_INITIALIZED
> (I think you can check that in a JS exception?)

Yeah, you could just do:
if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED)
before the dump();.
OS: Linux → All
Hardware: PC → All
Attached patch patch v1 (obsolete) — Splinter Review
Remove the noise in the error console.

Not sure if I should replace this._updateCrashReportURL with an empty function when it's a NS_ERROR_NOT_INITIALIZED error.
Attachment #286211 - Flags: review?(gavin.sharp)
Assignee: nobody → f.qu
Comment on attachment 286211 [details] [diff] [review]
patch v1

Add a comment explaining why you're ignoring that exception? I'm assuming you've tested this.
Attachment #286211 - Flags: review?(gavin.sharp) → review+
(In reply to comment #5)
> (From update of attachment 286211 [details] [diff] [review])
> Add a comment explaining why you're ignoring that exception?

Done.

> I'm assuming you've tested this.

Yes, I've checked that it doesn't make noise any more.
Attachment #286211 - Attachment is obsolete: true
Comment on attachment 286313 [details] [diff] [review]
patch v2 (ready for checkin)

Removes annoying debug msg that repeatedly appears in the error console for those who build Firefox. This won't affect release builds, as they never make it to this codepath, but for those who will try to compile the beta's source themselves or just developers building themselves, this will remove a message that fills up the error console.
Attachment #286313 - Flags: approvalM9?
Attachment #286313 - Flags: approval1.9?
Comment on attachment 286313 [details] [diff] [review]
patch v2 (ready for checkin)

a=endgame drivers for M9
Attachment #286313 - Flags: approvalM9?
Attachment #286313 - Flags: approvalM9+
Attachment #286313 - Flags: approval1.9?
Attachment #286313 - Flags: approval1.9+
Checking in browser/components/sessionstore/src/nsSessionStore.js;
/cvsroot/mozilla/browser/components/sessionstore/src/nsSessionStore.js,v  <--  nsSessionStore.js
new revision: 1.83; previous revision: 1.82
done
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M9
Duplicate of this bug: 390395
You need to log in before you can comment on or make changes to this bug.