From 5ff8a189790e42c5770b85205cc26deea5e613bb Mon Sep 17 00:00:00 2001 From: mlippautz Date: Tue, 29 Sep 2015 12:17:23 -0700 Subject: [PATCH] [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} --- src/api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.cc b/src/api.cc index dbe7670b49..cfc170ee8e 100644 --- a/src/api.cc +++ b/src/api.cc @@ -6839,7 +6839,7 @@ Local v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) { void Isolate::ReportExternalAllocationLimitReached() { i::Heap* heap = reinterpret_cast(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."); }