diff --git a/src/heap.cc b/src/heap.cc index 8ea954202e..75748dd27a 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -794,7 +794,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector, } isolate_->counters()->objs_since_last_young()->Set(0); - + gc_post_processing_depth_++; { DisableAssertNoAllocation allow_allocation; GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); diff --git a/src/heap.h b/src/heap.h index 312519e39e..a6455e51ec 100644 --- a/src/heap.h +++ b/src/heap.h @@ -1053,7 +1053,7 @@ class Heap { enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }; inline HeapState gc_state() { return gc_state_; } - + inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; } #ifdef DEBUG