mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
1444335 - Nursery allocation is not infallible, even right after collecting the nursery
1444335 - Nursery allocation is not infallible, even right after collecting the nursery. Hoping this solves crash.
This commit is contained in:
parent
086bacbf22
commit
af8f174181
1 changed files with 4 additions and 10 deletions
|
|
@ -92,11 +92,8 @@ GCRuntime::tryNewNurseryObject(JSContext* cx, size_t thingSize, size_t nDynamicS
|
|||
minorGC(JS::gcreason::OUT_OF_NURSERY);
|
||||
|
||||
// Exceeding gcMaxBytes while tenuring can disable the Nursery.
|
||||
if (nursery.isEnabled()) {
|
||||
JSObject* obj = nursery.allocateObject(cx, thingSize, nDynamicSlots, clasp);
|
||||
MOZ_ASSERT(obj);
|
||||
return obj;
|
||||
}
|
||||
if (cx->nursery().isEnabled())
|
||||
return cx->nursery().allocateObject(cx, thingSize, nDynamicSlots, clasp);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -147,11 +144,8 @@ GCRuntime::tryNewNurseryString(JSContext* cx, size_t thingSize, AllocKind kind)
|
|||
cx->runtime()->gc.minorGC(JS::gcreason::OUT_OF_NURSERY);
|
||||
|
||||
// Exceeding gcMaxBytes while tenuring can disable the Nursery.
|
||||
if (cx->nursery().isEnabled()) {
|
||||
cell = cx->nursery().allocateString(cx, cx->zone(), thingSize, kind);
|
||||
MOZ_ASSERT(cell);
|
||||
return static_cast<JSString*>(cell);
|
||||
}
|
||||
if (cx->nursery().isEnabled())
|
||||
return static_cast<JSString*>(cx->nursery().allocateString(cx, cx->zone(), thingSize, kind));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue