mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1100493 - Call js_ReportOutOfMemory on all failure paths in refillFreeList; r=jorendorff
This commit is contained in:
parent
428fcb7c71
commit
156ac59ca4
@ -3051,6 +3051,7 @@ GCRuntime::refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind)
|
||||
// instead of reporting it.
|
||||
if (!allowGC) {
|
||||
MOZ_ASSERT(!mustCollectNow);
|
||||
js_ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -3099,7 +3100,12 @@ GCRuntime::refillFreeListOffMainThread(ExclusiveContext *cx, AllocKind thingKind
|
||||
while (rt->isHeapBusy())
|
||||
HelperThreadState().wait(GlobalHelperThreadState::PRODUCER);
|
||||
|
||||
return allocator->arenas.allocateFromArena(zone, thingKind, maybeStartBGAlloc);
|
||||
void *thing = allocator->arenas.allocateFromArena(zone, thingKind, maybeStartBGAlloc);
|
||||
if (thing)
|
||||
return thing;
|
||||
|
||||
js_ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* static */ void *
|
||||
|
@ -244,7 +244,7 @@ ShapeTable::search(jsid id, bool adding)
|
||||
}
|
||||
}
|
||||
|
||||
/* NOTREACHED */
|
||||
MOZ_CRASH("Shape::search failed to find an expected entry.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user