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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface.h.tmpl

Issue 2653153003: Emit trace(Visitor*) rather than a templated trace(). (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #ifndef {{v8_class}}_h 4 #ifndef {{v8_class}}_h
5 #define {{v8_class}}_h 5 #define {{v8_class}}_h
6 6
7 {% for filename in header_includes %} 7 {% for filename in header_includes %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 29 matching lines...) Expand all
40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) { 40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) {
41 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); 41 return toScriptWrappable(object)->toImpl<{{cpp_class}}>();
42 } 42 }
43 {% endif %} 43 {% endif %}
44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local< v8::Value>); 44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local< v8::Value>);
45 {% if has_partial_interface %} 45 {% if has_partial_interface %}
46 {{exported}}static WrapperTypeInfo wrapperTypeInfo; 46 {{exported}}static WrapperTypeInfo wrapperTypeInfo;
47 {% else %} 47 {% else %}
48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; 48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo;
49 {% endif %} 49 {% endif %}
50 template<typename VisitorDispatcher> 50 static void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) {
51 static void trace(VisitorDispatcher visitor, ScriptWrappable* scriptWrappable) {
52 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); 51 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>());
53 } 52 }
54 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap pable) { 53 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap pable) {
55 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); 54 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>());
56 } 55 }
57 {% if has_visit_dom_wrapper %} 56 {% if has_visit_dom_wrapper %}
58 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persiste nt<v8::Object>&); 57 static void visitDOMWrapper(v8::Isolate*, ScriptWrappable*, const v8::Persiste nt<v8::Object>&);
59 {% endif %} 58 {% endif %}
60 {% if has_visit_dom_wrapper_custom %} 59 {% if has_visit_dom_wrapper_custom %}
61 static void visitDOMWrapperCustom(v8::Isolate*, ScriptWrappable*, const v8::Pe rsistent<v8::Object>&); 60 static void visitDOMWrapperCustom(v8::Isolate*, ScriptWrappable*, const v8::Pe rsistent<v8::Object>&);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 template <> 180 template <>
182 struct V8TypeOf<{{cpp_class}}> { 181 struct V8TypeOf<{{cpp_class}}> {
183 typedef {{v8_class}} Type; 182 typedef {{v8_class}} Type;
184 }; 183 };
185 184
186 } // namespace blink 185 } // namespace blink
187 186
188 #endif // {{v8_class}}_h 187 #endif // {{v8_class}}_h
189 188
190 {% endfilter %}{# format_blink_cpp_source_code #} 189 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698