[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:
mlippautz 2015-09-29 12:17:23 -07:00 committed by Commit bot
parent 8bd431de92
commit 5ff8a18979

View File

@ -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.");
}