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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl

Issue 2479133002: [wrapper-tracing] Fix dispatching of TraceWrapperv8Reference (Closed)
Patch Set: Regenerate bindings results Created 4 years, 1 month 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
OLDNEW
1 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %} 1 {% from 'utilities.cpp.tmpl' import v8_value_to_local_cpp_value %}
2 {% filter format_blink_cpp_source_code %} 2 {% filter format_blink_cpp_source_code %}
3 3
4 {% include 'copyright_block.txt' %} 4 {% include 'copyright_block.txt' %}
5 5
6 #include "{{cpp_class}}.h" 6 #include "{{cpp_class}}.h"
7 7
8 {% for filename in cpp_includes %} 8 {% for filename in cpp_includes %}
9 #include "{{filename}}" 9 #include "{{filename}}"
10 {% endfor %} 10 {% endfor %}
11 11
12 namespace blink { 12 namespace blink {
13 13
14 {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> c allback) 14 {{cpp_class}}::{{cpp_class}}(ScriptState* scriptState, v8::Local<v8::Function> c allback)
15 : m_scriptState(scriptState), 15 : m_scriptState(scriptState),
16 m_callback(scriptState->isolate(), this, callback) { 16 m_callback(scriptState->isolate(), this, callback) {
17 DCHECK(!m_callback.isEmpty()); 17 DCHECK(!m_callback.isEmpty());
18 m_callback.setPhantom();
19 } 18 }
20 19
21 DEFINE_TRACE({{cpp_class}}) {} 20 DEFINE_TRACE({{cpp_class}}) {}
22 21
23 DEFINE_TRACE_WRAPPERS({{cpp_class}}) { 22 DEFINE_TRACE_WRAPPERS({{cpp_class}}) {
24 visitor->traceWrappers(m_callback.cast<v8::Value>()); 23 visitor->traceWrappers(m_callback.cast<v8::Value>());
25 } 24 }
26 25
27 bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { 26 bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) {
28 if (!m_scriptState->contextIsValid()) 27 if (!m_scriptState->contextIsValid())
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 returnValue = cppValue; 63 returnValue = cppValue;
65 {% endif %} 64 {% endif %}
66 return true; 65 return true;
67 } 66 }
68 return false; 67 return false;
69 } 68 }
70 69
71 } // namespace blink 70 } // namespace blink
72 71
73 {% endfilter %}{# format_blink_cpp_source_code #} 72 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698