[api] Avoid recursive GCs through reaching external allocation limit
See bug description. BUG=chromium:536231 LOG=N Review URL: https://codereview.chromium.org/1378693002 Cr-Commit-Position: refs/heads/master@{#31012}
This commit is contained in:
parent
8bd431de92
commit
5ff8a18979
@ -6839,7 +6839,7 @@ Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) {
|
||||
|
||||
void Isolate::ReportExternalAllocationLimitReached() {
|
||||
i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
|
||||
DCHECK_EQ(heap->gc_state(), i::Heap::NOT_IN_GC);
|
||||
if (heap->gc_state() != i::Heap::NOT_IN_GC) return;
|
||||
heap->ReportExternalMemoryPressure(
|
||||
"external memory allocation limit reached.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user