OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WrapperVisitor_h | 5 #ifndef WrapperVisitor_h |
6 #define WrapperVisitor_h | 6 #define WrapperVisitor_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 template<typename T> | 103 template<typename T> |
104 void traceWrappers(const Member<T>& t) const | 104 void traceWrappers(const Member<T>& t) const |
105 { | 105 { |
106 traceWrappers(t.get()); | 106 traceWrappers(t.get()); |
107 } | 107 } |
108 | 108 |
109 virtual void traceWrappers(const ScopedPersistent<v8::Value>*) const = 0; | 109 virtual void traceWrappers(const ScopedPersistent<v8::Value>*) const = 0; |
110 | 110 |
111 template<typename T> | |
112 bool markWrapperHeader(const T* object) const | |
113 { | |
114 return markWrapperHeader(object, object); | |
115 } | |
116 | |
117 virtual void dispatchTraceWrappers(const ScriptWrappable*) const = 0; | 111 virtual void dispatchTraceWrappers(const ScriptWrappable*) const = 0; |
118 #define DECLARE_DISPATCH_TRACE_WRAPPERS(className) \ | 112 #define DECLARE_DISPATCH_TRACE_WRAPPERS(className) \ |
119 virtual void dispatchTraceWrappers(const className*) const = 0; | 113 virtual void dispatchTraceWrappers(const className*) const = 0; |
120 | 114 |
121 WRAPPER_VISITOR_SPECIAL_CLASSES(DECLARE_DISPATCH_TRACE_WRAPPERS); | 115 WRAPPER_VISITOR_SPECIAL_CLASSES(DECLARE_DISPATCH_TRACE_WRAPPERS); |
122 | 116 |
123 #undef DECLARE_DISPATCH_TRACE_WRAPPERS | 117 #undef DECLARE_DISPATCH_TRACE_WRAPPERS |
124 virtual void dispatchTraceWrappers(const void*) const = 0; | 118 virtual void dispatchTraceWrappers(const void*) const = 0; |
125 | 119 |
126 protected: | 120 virtual bool markWrapperHeader(const ScriptWrappable*) const = 0; |
127 virtual bool markWrapperHeader(const ScriptWrappable*, const void*) const =
0; | 121 virtual bool markWrapperHeader(const void*) const = 0; |
128 virtual bool markWrapperHeader(const void*, const void*) const = 0; | |
129 }; | 122 }; |
130 | 123 |
131 } // namespace blink | 124 } // namespace blink |
132 | 125 |
133 #endif // WrapperVisitor_h | 126 #endif // WrapperVisitor_h |
OLD | NEW |