diff --git a/js/src/jsgcinlines.h b/js/src/jsgcinlines.h index 1f76c8c005aa..8a16e7164e6e 100644 --- a/js/src/jsgcinlines.h +++ b/js/src/jsgcinlines.h @@ -481,10 +481,8 @@ typedef CompartmentsIterT GCCompartmentGroupIter; */ template inline JSObject * -TryNewNurseryObject(ThreadSafeContext *cxArg, size_t thingSize, size_t nDynamicSlots) +TryNewNurseryObject(JSContext *cx, size_t thingSize, size_t nDynamicSlots) { - JSContext *cx = cxArg->asJSContext(); - JS_ASSERT(!IsAtomsCompartment(cx->compartment())); JSRuntime *rt = cx->runtime(); Nursery &nursery = rt->gc.nursery; @@ -508,7 +506,7 @@ TryNewNurseryObject(ThreadSafeContext *cxArg, size_t thingSize, size_t nDynamicS #ifdef JSGC_FJGENERATIONAL template inline JSObject * -TryNewFJNurseryObject(ForkJoinContext *cx, size_t thingSize, size_t nDynamicSlots) +TryNewNurseryObject(ForkJoinContext *cx, size_t thingSize, size_t nDynamicSlots) { ForkJoinNursery &nursery = cx->nursery(); bool tooLarge = false; @@ -617,7 +615,7 @@ AllocateObject(ThreadSafeContext *cx, AllocKind kind, size_t nDynamicSlots, Init #ifdef JSGC_GENERATIONAL if (cx->isJSContext() && ShouldNurseryAllocate(cx->asJSContext()->nursery(), kind, heap)) { - JSObject *obj = TryNewNurseryObject(cx, thingSize, nDynamicSlots); + JSObject *obj = TryNewNurseryObject(cx->asJSContext(), thingSize, nDynamicSlots); if (obj) return obj; } @@ -627,7 +625,7 @@ AllocateObject(ThreadSafeContext *cx, AllocKind kind, size_t nDynamicSlots, Init ShouldFJNurseryAllocate(cx->asForkJoinContext()->nursery(), kind, heap)) { JSObject *obj = - TryNewFJNurseryObject(cx->asForkJoinContext(), thingSize, nDynamicSlots); + TryNewNurseryObject(cx->asForkJoinContext(), thingSize, nDynamicSlots); if (obj) return obj; }