Last Comment Bug 670205 - JSOPTION_UNROOTED_GLOBAL is lost in ContextHolder::ContextHolder
: JSOPTION_UNROOTED_GLOBAL is lost in ContextHolder::ContextHolder
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla8
Assigned To: Bill McCloskey (:billm)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-08 11:44 PDT by Bill McCloskey (:billm)
Modified: 2011-07-28 08:14 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (859 bytes, patch)
2011-07-08 11:44 PDT, Bill McCloskey (:billm)
gal: review+
Details | Diff | Splinter Review

Description Bill McCloskey (:billm) 2011-07-08 11:44:30 PDT
Created attachment 544871 [details] [diff] [review]
fix

Copying this from bug 585221...

I'm getting an assertion here:

void XPCJSRuntime::TraceXPConnectRoots(JSTracer *trc)
{ ...
        JS_ASSERT(acx->hasRunOption(JSOPTION_UNROOTED_GLOBAL));
}

The place where the option gets unset is here:
ContextHolder::ContextHolder(JSContext *aOuterCx, JSObject *aSandbox)
{ ...
        JS_SetOptions(mJSContext,
                      JSOPTION_DONT_REPORT_UNCAUGHT |
                      JSOPTION_PRIVATE_IS_NSISUPPORTS);
}

I made a patch that ORs in the existing options (which currently are just the unrooted global option).
Comment 1 Andreas Gal :gal 2011-07-08 11:48:07 PDT
This is great. I have been looking for this bug forever.
Comment 2 :Ehsan Akhgari 2011-07-26 11:43:11 PDT
Backed out of inbound because of build bustage.

Note You need to log in before you can comment on or make changes to this bug.