Index: Source/platform/heap/Visitor.h |
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h |
index 8605f31fbeeff903ff5166e93c63bf4771bb92d5..038253f3e2ebe9612ba0e92b5ab28cc7392c86b6 100644 |
--- a/Source/platform/heap/Visitor.h |
+++ b/Source/platform/heap/Visitor.h |
@@ -478,6 +478,11 @@ class PLATFORM_EXPORT Visitor : public VisitorHelper<Visitor> { |
public: |
friend class VisitorHelper<Visitor>; |
+ enum VisitorType { |
+ GlobalMarkingVisitorType, |
+ GenericVisitorType, |
+ }; |
+ |
virtual ~Visitor() { } |
// FIXME: This is a temporary hack to cheat old Blink GC plugin checks. |
@@ -569,9 +574,12 @@ public: |
inline void incrementTraceDepth() { m_traceDepth++; } |
inline void decrementTraceDepth() { ASSERT(m_traceDepth > 0); m_traceDepth--; } |
+ inline bool isGlobalMarkingVisitor() const { return m_isGlobalMarkingVisitor; } |
+ |
protected: |
- Visitor() |
+ explicit Visitor(VisitorType type) |
: m_traceDepth(0) |
+ , m_isGlobalMarkingVisitor(type == GlobalMarkingVisitorType) |
{ |
} |
@@ -587,6 +595,7 @@ private: |
const int kMaxEagerTraceDepth = 100; |
int m_traceDepth; |
+ bool m_isGlobalMarkingVisitor; |
}; |
// We trace vectors by using the trace trait on each element, which means you |