Index: src/heap-inl.h |
diff --git a/src/heap-inl.h b/src/heap-inl.h |
index a45e3ab9d9ce1630f6b2a2a6da719fd1b42beb45..f74c4c7a7fb1cd870ed0edab16e86b03635020af 100644 |
--- a/src/heap-inl.h |
+++ b/src/heap-inl.h |
@@ -809,6 +809,21 @@ NoWeakObjectVerificationScope::~NoWeakObjectVerificationScope() { |
#endif |
+GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { |
+ heap_->gc_callbacks_depth_++; |
+} |
+ |
+ |
+GCCallbacksScope::~GCCallbacksScope() { |
+ heap_->gc_callbacks_depth_--; |
+} |
+ |
+ |
+bool GCCallbacksScope::CheckReenter() { |
+ return heap_->gc_callbacks_depth_ == 1; |
+} |
+ |
+ |
void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { |
for (Object** current = start; current < end; current++) { |
if ((*current)->IsHeapObject()) { |