Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index a25225c2bec962e07edfa8b4c754650f1be0cf4e..59121dcb7d43e6d97a10535b503f696939e4e7c3 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -1851,6 +1851,9 @@ public: |
MarkingVisitor() |
: Visitor(Mode == GlobalMarking ? Visitor::GlobalMarkingVisitorType : Visitor::GenericVisitorType) |
+#if ENABLE(ASSERT) |
+ , m_allowMarkingForHashTableWeakProcessing(false) |
+#endif |
{ |
} |
@@ -2023,6 +2026,20 @@ protected: |
// does, the object should not be marked & traced. |
return page->terminating(); |
} |
+ |
+#if ENABLE(ASSERT) |
+ virtual void checkMarkingAllowed() override |
+ { |
+ ASSERT(ThreadState::current()->isInGC() || m_allowMarkingForHashTableWeakProcessing); |
+ } |
+ |
+ virtual void setAllowMarkingForHashTableWeakProcessing(bool allow) override |
+ { |
+ m_allowMarkingForHashTableWeakProcessing = allow; |
+ } |
+ |
+ bool m_allowMarkingForHashTableWeakProcessing; |
+#endif |
}; |
void Heap::init() |