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

Unified Diff: Source/platform/heap/Visitor.h

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 | « Source/platform/heap/InlinedGlobalMarkingVisitor.h ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index d000afcb73de51916524129c0cf529201cb7a355..e4c51f7a0ba6cd65304fec4b5a09b65c52f2299f 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -344,6 +344,7 @@ public:
return;
#if ENABLE(ASSERT)
TraceTrait<T>::checkGCInfo(t);
+ Derived::fromHelper(this)->checkMarkingAllowed();
#endif
TraceTrait<T>::mark(Derived::fromHelper(this), t);
@@ -632,6 +633,10 @@ public:
inline bool isGlobalMarkingVisitor() const { return m_isGlobalMarkingVisitor; }
+#if ENABLE(ASSERT)
+ virtual void setAllowMarkingForHashTableWeakProcessing(bool) { }
+#endif
+
protected:
explicit Visitor(VisitorType type)
: m_isGlobalMarkingVisitor(type == GlobalMarkingVisitorType)
@@ -650,6 +655,10 @@ protected:
String m_hostName;
#endif
+#if ENABLE(ASSERT)
+ virtual void checkMarkingAllowed() { }
+#endif
+
private:
static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_cast<Visitor*>(helper); }
« no previous file with comments | « Source/platform/heap/InlinedGlobalMarkingVisitor.h ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698