Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1009)

Unified Diff: Source/platform/heap/Heap.cpp

Issue 824513004: ASSERT that Visitor::mark is only called when inGC() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: m_visitor Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/heap/InlinedGlobalMarkingVisitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | Source/platform/heap/InlinedGlobalMarkingVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698