| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index 1ac4dfaa0808848947834983bd862aa0fc9f44d2..81c7d4732caa9ad0c5b795ab441e527ec22fb30a 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -2510,6 +2510,8 @@ class Heap {
|
| bool relocation_mutex_locked_by_optimizer_thread_;
|
| #endif // DEBUG;
|
|
|
| + int gc_callbacks_depth_;
|
| +
|
| friend class Factory;
|
| friend class GCTracer;
|
| friend class DisallowAllocationFailure;
|
| @@ -2522,6 +2524,7 @@ class Heap {
|
| #ifdef VERIFY_HEAP
|
| friend class NoWeakObjectVerificationScope;
|
| #endif
|
| + friend class GCCallbacksScope;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Heap);
|
| };
|
| @@ -2594,6 +2597,18 @@ class NoWeakObjectVerificationScope {
|
| #endif
|
|
|
|
|
| +class GCCallbacksScope {
|
| + public:
|
| + explicit inline GCCallbacksScope(Heap* heap);
|
| + inline ~GCCallbacksScope();
|
| +
|
| + inline bool CheckReenter();
|
| +
|
| + private:
|
| + Heap* heap_;
|
| +};
|
| +
|
| +
|
| // Visitor class to verify interior pointers in spaces that do not contain
|
| // or care about intergenerational references. All heap object pointers have to
|
| // point into the heap to a location that has a map pointer at its first word.
|
|
|