Bug 1447073 - Check that helper threads never allocate in the nursery r=sfink

This commit is contained in:
Jon Coppeard 2018-03-20 17:59:02 +00:00
Родитель 073e868441
Коммит 6d800ba596
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -82,10 +82,12 @@ template <AllowGC allowGC>
JSObject*
GCRuntime::tryNewNurseryObject(JSContext* cx, size_t thingSize, size_t nDynamicSlots, const Class* clasp)
{
MOZ_RELEASE_ASSERT(!cx->helperThread());
MOZ_ASSERT(cx->isNurseryAllocAllowed());
MOZ_ASSERT(!cx->helperThread());
MOZ_ASSERT(!cx->isNurseryAllocSuppressed());
MOZ_ASSERT(!IsAtomsCompartment(cx->compartment()));
JSObject* obj = cx->nursery().allocateObject(cx, thingSize, nDynamicSlots, clasp);
if (obj)
return obj;