Bug 844112 - GC: Fix misc build and test failures in exactly rooted shell r=sfink

This commit is contained in:
Jon Coppeard 2013-02-22 15:14:09 +00:00
parent 30c6f9bebb
commit c919b27a50
3 changed files with 9 additions and 4 deletions

View File

@ -49,6 +49,9 @@ MarkExactStackRoot(JSTracer *trc, Rooted<void*> *rooter, ThingRootKind kind)
if (!*addr)
return;
if (kind == THING_ROOT_OBJECT && *addr == Proxy::LazyProto)
return;
switch (kind) {
case THING_ROOT_OBJECT: MarkObjectRoot(trc, (JSObject **)addr, "exact-object"); break;
case THING_ROOT_STRING: MarkStringRoot(trc, (JSString **)addr, "exact-string"); break;
@ -81,7 +84,7 @@ MarkExactStackRoots(JSTracer *trc)
for (ContextIter cx(trc->runtime); !cx.done(); cx.next())
MarkExactStackRootList(trc, cx->thingGCRooters[i], ThingRootKind(i));
MarkExactStackRootList(trc, trc->runtime->mainThread->thingGCRooters[i], ThingRootKind(i));
MarkExactStackRootList(trc, trc->runtime->mainThread.thingGCRooters[i], ThingRootKind(i));
}
}
#endif /* JSGC_USE_EXACT_ROOTING */

View File

@ -1208,11 +1208,11 @@ JSContext::JSContext(JSRuntime *rt)
JS_ASSERT(static_cast<ContextFriendFields*>(this) ==
ContextFriendFields::get(this));
#ifdef JSGC_ROOT_ANALYSIS
#if defined(JSGC_ROOT_ANALYSIS) || defined(JSGC_USE_EXACT_ROOTING)
PodArrayZero(thingGCRooters);
#if defined(JS_GC_ZEAL) && defined(DEBUG) && !defined(JS_THREADSAFE)
skipGCRooters = NULL;
#endif
#if defined(DEBUG) && defined(JS_GC_ZEAL) && defined(JSGC_ROOT_ANALYSIS) && !defined(JS_THREADSAFE)
skipGCRooters = NULL;
#endif
}

View File

@ -1646,6 +1646,7 @@ BEGIN_CASE(JSOP_IN)
if (!JSObject::lookupGeneric(cx, obj, id, &obj2, &prop))
goto error;
bool cond = prop != NULL;
prop = NULL;
TRY_BRANCH_AFTER_COND(cond, 2);
regs.sp--;
regs.sp[-1].setBoolean(cond);
@ -2087,6 +2088,7 @@ BEGIN_CASE(JSOP_DELNAME)
if (!JSObject::deleteProperty(cx, scope, name, res, false))
goto error;
}
prop = NULL;
}
END_CASE(JSOP_DELNAME)