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

Side by Side Diff: third_party/WebKit/Source/platform/heap/WrapperVisitor.h

Issue 2045453002: Refactor WrapperTypeInfo.traceWrappers to WrapperTypeInfo.getHeader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use nicer name Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698