| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 {% if return_value %} | 76 {% if return_value %} |
| 77 {{v8_value_to_local_cpp_value(return_value) | indent(2)}} | 77 {{v8_value_to_local_cpp_value(return_value) | indent(2)}} |
| 78 returnValue = cppValue; | 78 returnValue = cppValue; |
| 79 {% endif %} | 79 {% endif %} |
| 80 return true; | 80 return true; |
| 81 } | 81 } |
| 82 | 82 |
| 83 {{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolat
e, v8::Local<v8::Value> value, ExceptionState& exceptionState) { | 83 {{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolat
e, v8::Local<v8::Value> value, ExceptionState& exceptionState) { |
| 84 return {{cpp_class}}::create(ScriptState::current(isolate), value); | 84 {{cpp_class}}* nativeValue = {{cpp_class}}::create(ScriptState::current(isolat
e), value); |
| 85 if (!nativeValue) |
| 86 exceptionState.throwTypeError("Unable to convert value to {{callback_functio
n_name}}."); |
| 87 return nativeValue; |
| 85 } | 88 } |
| 86 | 89 |
| 87 } // namespace blink | 90 } // namespace blink |
| 88 | 91 |
| 89 {% endfilter %}{# format_blink_cpp_source_code #} | 92 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |