зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646321 - Do a GC_SHRINK on large-alloc failure. r=jonco
If a large allocation fails, do what we can to free up memory, including discarding code if necessary - sometimes the failing allocation is looking for code memory. Differential Revision: https://phabricator.services.mozilla.com/D79990
This commit is contained in:
Родитель
338877b3cb
Коммит
3bcf287de7
|
@ -1935,7 +1935,7 @@ static void my_LargeAllocFailCallback() {
|
|||
MOZ_ASSERT(!JS::RuntimeHeapIsBusy());
|
||||
|
||||
JS::PrepareForFullGC(cx);
|
||||
cx->runtime()->gc.gc(GC_NORMAL, JS::GCReason::SHARED_MEMORY_LIMIT);
|
||||
cx->runtime()->gc.gc(GC_SHRINK, JS::GCReason::SHARED_MEMORY_LIMIT);
|
||||
}
|
||||
|
||||
static const uint32_t CacheEntry_SOURCE = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче