mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202051 - Use a PersistentRooted to automate tracing of unwrappedException_; r=sfink
This commit is contained in:
parent
2ea26571c1
commit
eaae78a40d
@ -947,7 +947,7 @@ ExclusiveContext::recoverFromOutOfMemory()
|
||||
JSContext::JSContext(JSRuntime* rt)
|
||||
: ExclusiveContext(rt, &rt->mainThread, Context_JS),
|
||||
throwing(false),
|
||||
unwrappedException_(UndefinedValue()),
|
||||
unwrappedException_(this),
|
||||
options_(),
|
||||
overRecursed_(false),
|
||||
propagatingForcedReturn_(false),
|
||||
@ -1136,10 +1136,6 @@ JSContext::mark(JSTracer* trc)
|
||||
{
|
||||
/* Stack frames and slots are traced by StackSpace::mark. */
|
||||
|
||||
/* Mark other roots-by-definition in the JSContext. */
|
||||
if (isExceptionPending())
|
||||
TraceRoot(trc, &unwrappedException_, "unwrapped exception");
|
||||
|
||||
TraceCycleDetectionSet(trc, cycleDetectorSet);
|
||||
|
||||
if (compartment_)
|
||||
|
@ -305,7 +305,7 @@ struct JSContext : public js::ExclusiveContext,
|
||||
private:
|
||||
/* Exception state -- the exception member is a GC root by definition. */
|
||||
bool throwing; /* is there a pending exception? */
|
||||
js::Value unwrappedException_; /* most-recently-thrown exception */
|
||||
JS::PersistentRooted<JS::Value> unwrappedException_; /* most-recently-thrown exception */
|
||||
|
||||
/* Per-context options. */
|
||||
JS::ContextOptions options_;
|
||||
|
Loading…
Reference in New Issue
Block a user