From aec8987b5ee55fa46b90b58927e957a4e5f19c09 Mon Sep 17 00:00:00 2001 From: epertoso Date: Thu, 30 Jul 2015 06:41:25 -0700 Subject: [PATCH] Pass the kGCCallbackFlagForced flag when invoking Heap::CollectAllGarbage from AdjustAmountOfExternalAllocatedMemory. This forces the second pass of the pending phantom callbacks to run immediately after the first. BUG=chromium:511294 LOG=Y Review URL: https://codereview.chromium.org/1252993004 Cr-Commit-Position: refs/heads/master@{#29933} --- src/api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.cc b/src/api.cc index 646c070..74970e8 100644 --- a/src/api.cc +++ b/src/api.cc @@ -6885,7 +6885,7 @@ Local v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) { void Isolate::CollectAllGarbage(const char* gc_reason) { reinterpret_cast(this)->heap()->CollectAllGarbage( - i::Heap::kNoGCFlags, gc_reason); + i::Heap::kNoGCFlags, gc_reason, v8::kGCCallbackFlagForced); } -- 2.7.4