OLD | NEW |
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 %} |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate())
, m_scriptState->getExecutionContext(), thisValue, {{arguments | length}}, argv,
m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { | 67 if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate())
, m_scriptState->getExecutionContext(), thisValue, {{arguments | length}}, argv,
m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { |
68 {% if return_value %} | 68 {% if return_value %} |
69 {{v8_value_to_local_cpp_value(return_value) | indent(8)}} | 69 {{v8_value_to_local_cpp_value(return_value) | indent(8)}} |
70 returnValue = cppValue; | 70 returnValue = cppValue; |
71 {% endif %} | 71 {% endif %} |
72 return true; | 72 return true; |
73 } | 73 } |
74 return false; | 74 return false; |
75 } | 75 } |
76 | 76 |
| 77 {{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolat
e, v8::Local<v8::Value> value, ExceptionState& exceptionState) { |
| 78 return {{cpp_class}}::create(ScriptState::current(isolate), value); |
| 79 } |
| 80 |
77 } // namespace blink | 81 } // namespace blink |
78 | 82 |
79 {% endfilter %}{# format_blink_cpp_source_code #} | 83 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |