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
This commit is contained in:
yangguo@chromium.org 2014-04-07 13:36:43 +00:00
parent 385cc59c52
commit 97a223e569

View File

@ -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