Commit 97a223e5 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Do not greedy GC if no allocation is expected/allowed.

R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/227513003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 385cc59c
......@@ -7528,6 +7528,7 @@ void Heap::GarbageCollectionGreedyCheck() {
ASSERT(FLAG_gc_greedy);
if (isolate_->bootstrapper()->IsActive()) return;
if (!AllowAllocationFailure::IsAllowed(isolate_)) return;
if (!AllowHeapAllocation::IsAllowed(isolate_)) return;
CollectGarbage(NEW_SPACE);
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment