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

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: 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') | Source/wtf/HashTable.h » ('J')
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..aa76e81c63878a0c7b19d0c399a2ffd36f8ad009 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_allowTraceForHashTableWeakProcessing(false)
+#endif
{
}
@@ -2023,6 +2026,20 @@ protected:
// does, the object should not be marked & traced.
return page->terminating();
}
+
+#if ENABLE(ASSERT)
+ virtual void checkIsMarkingAllowed() override
haraken 2015/01/13 07:55:53 It sounds inconsistent to have check"IsMarking"All
kouhei (in TOK) 2015/01/14 02:10:05 Done.
+ {
+ ASSERT(ThreadState::current()->isInGC() || m_allowTraceForHashTableWeakProcessing);
+ }
+
+ virtual void setAllowTraceForHashTableWeakProcessing(bool allow) override
+ {
+ m_allowTraceForHashTableWeakProcessing = true;
haraken 2015/01/13 07:55:53 Shouldn't this be '= allow' ?
kouhei (in TOK) 2015/01/14 02:10:05 Done.
+ }
+
+ bool m_allowTraceForHashTableWeakProcessing;
+#endif
};
void Heap::init()
« no previous file with comments | « no previous file | Source/platform/heap/InlinedGlobalMarkingVisitor.h » ('j') | Source/wtf/HashTable.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698