| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index 5db1c954c3ea098fa66a716a0218e35fec270fc3..3cb14fc0ea6ceb8344387821e939c9e35bb16cf7 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -1322,6 +1322,11 @@ class Heap {
|
| #ifdef VERIFY_HEAP
|
| // Verify the heap is in its normal state before or after a GC.
|
| void Verify();
|
| +
|
| +
|
| + bool weak_embedded_maps_verification_enabled() {
|
| + return no_weak_embedded_maps_verification_scope_depth_ == 0;
|
| + }
|
| #endif
|
|
|
| #ifdef DEBUG
|
| @@ -2190,6 +2195,10 @@ class Heap {
|
| unsigned int gc_count_at_last_idle_gc_;
|
| int scavenges_since_last_idle_round_;
|
|
|
| +#ifdef VERIFY_HEAP
|
| + int no_weak_embedded_maps_verification_scope_depth_;
|
| +#endif
|
| +
|
| static const int kMaxMarkSweepsInIdleRound = 7;
|
| static const int kIdleScavengeThreshold = 5;
|
|
|
| @@ -2219,6 +2228,9 @@ class Heap {
|
| friend class MarkCompactCollector;
|
| friend class MarkCompactMarkingVisitor;
|
| friend class MapCompact;
|
| +#ifdef VERIFY_HEAP
|
| + friend class NoWeakEmbeddedMapsVerificationScope;
|
| +#endif
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Heap);
|
| };
|
| @@ -2279,6 +2291,14 @@ class AlwaysAllocateScope {
|
| DisallowAllocationFailure disallow_allocation_failure_;
|
| };
|
|
|
| +#ifdef VERIFY_HEAP
|
| +class NoWeakEmbeddedMapsVerificationScope {
|
| + public:
|
| + inline NoWeakEmbeddedMapsVerificationScope();
|
| + inline ~NoWeakEmbeddedMapsVerificationScope();
|
| +};
|
| +#endif
|
| +
|
|
|
| // Visitor class to verify interior pointers in spaces that do not contain
|
| // or care about intergenerational references. All heap object pointers have to
|
|
|