mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Merge tm to mozilla-central. a=blockers
This commit is contained in:
commit
b36b4a49df
@ -413,9 +413,6 @@ struct Closure
|
||||
JSContext *cx;
|
||||
bool cycleCollectionEnabled;
|
||||
nsCycleCollectionTraversalCallback *cb;
|
||||
#ifdef DEBUG
|
||||
JSCompartment *compartment;
|
||||
#endif
|
||||
};
|
||||
|
||||
static void
|
||||
@ -423,16 +420,6 @@ CheckParticipatesInCycleCollection(PRUint32 aLangID, void *aThing, void *aClosur
|
||||
{
|
||||
Closure *closure = static_cast<Closure*>(aClosure);
|
||||
|
||||
#ifdef DEBUG
|
||||
if(aLangID == nsIProgrammingLanguage::JAVASCRIPT &&
|
||||
js_GetGCThingTraceKind(aThing) == JSTRACE_OBJECT)
|
||||
{
|
||||
JSCompartment *c = static_cast<JSObject*>(aThing)->compartment();
|
||||
JS_ASSERT(!closure->compartment || closure->compartment == c);
|
||||
closure->compartment = c;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!closure->cycleCollectionEnabled &&
|
||||
aLangID == nsIProgrammingLanguage::JAVASCRIPT &&
|
||||
js_GetGCThingTraceKind(aThing) == JSTRACE_OBJECT)
|
||||
@ -451,9 +438,6 @@ NoteJSHolder(JSDHashTable *table, JSDHashEntryHdr *hdr, uint32 number,
|
||||
Closure *closure = static_cast<Closure*>(arg);
|
||||
|
||||
closure->cycleCollectionEnabled = PR_FALSE;
|
||||
#ifdef DEBUG
|
||||
closure->compartment = nsnull;
|
||||
#endif
|
||||
entry->tracer->Trace(entry->holder, CheckParticipatesInCycleCollection,
|
||||
closure);
|
||||
if(!closure->cycleCollectionEnabled)
|
||||
@ -513,11 +497,7 @@ XPCJSRuntime::AddXPConnectRoots(JSContext* cx,
|
||||
|
||||
if(mJSHolders.ops)
|
||||
{
|
||||
Closure closure = { cx, PR_TRUE, &cb
|
||||
#if DEBUG
|
||||
, nsnull
|
||||
#endif
|
||||
};
|
||||
Closure closure = { cx, PR_TRUE, &cb };
|
||||
JS_DHashTableEnumerate(&mJSHolders, NoteJSHolder, &closure);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user