Chromium Code Reviews| Index: third_party/WebKit/Source/platform/heap/Visitor.h |
| diff --git a/third_party/WebKit/Source/platform/heap/Visitor.h b/third_party/WebKit/Source/platform/heap/Visitor.h |
| index c65907728e1f115ccd2c8b95dc6f359b79f05c7e..561e966d2777a064abd18f02559b387159c2f995 100644 |
| --- a/third_party/WebKit/Source/platform/heap/Visitor.h |
| +++ b/third_party/WebKit/Source/platform/heap/Visitor.h |
| @@ -52,6 +52,7 @@ class InlinedGlobalMarkingVisitor; |
| template<typename T> class TraceTrait; |
| template<typename T> class TraceEagerlyTrait; |
| class Visitor; |
| +class GCData; |
| // The TraceMethodDelegate is used to convert a trace method for type T to a TraceCallback. |
| // This allows us to pass a type's trace method as a parameter to the PersistentNode |
| @@ -121,6 +122,8 @@ public: |
| template<typename Derived> |
| class VisitorHelper { |
| public: |
| + VisitorHelper(GCData* gcData) : m_gcData(gcData) {} |
|
haraken
2016/01/28 15:52:50
Add explicit.
|
| + |
| // One-argument templated mark method. This uses the static type of |
| // the argument to get the TraceTrait. By default, the mark method |
| // of the TraceTrait just calls the virtual two-argument mark method on this |
| @@ -281,9 +284,13 @@ public: |
| Derived::fromHelper(this)->registerWeakMembers(object, object, callback); |
| } |
| + inline GCData* gcData() const { return m_gcData; } |
| + |
| private: |
| template<typename T> |
| static void handleWeakCell(Visitor* self, void* object); |
| + |
| + GCData* m_gcData; |
| }; |
| // Visitor is used to traverse the Blink object graph. Used for the |
| @@ -372,8 +379,9 @@ public: |
| inline MarkingMode markingMode() const { return m_markingMode; } |
| protected: |
| - explicit Visitor(MarkingMode markingMode) |
| - : m_markingMode(markingMode) |
| + explicit Visitor(MarkingMode markingMode, GCData* gcData) |
| + : VisitorHelper(gcData) |
| + , m_markingMode(markingMode) |
| { } |
| virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; |