| OLD | NEW |
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% from 'utilities.cpp' import declare_enum_validation_variable %} | 3 {% from 'utilities.cpp' import declare_enum_validation_variable %} |
| 4 {% include 'copyright_block.txt' %} | 4 {% include 'copyright_block.txt' %} |
| 5 #include "{{v8_original_class}}.h" | 5 #include "{{v8_original_class}}.h" |
| 6 | 6 |
| 7 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} | 7 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} |
| 8 #include "{{filename}}" | 8 #include "{{filename}}" |
| 9 {% endfor %} | 9 {% endfor %} |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 {% endfilter %} | 88 {% endfilter %} |
| 89 | 89 |
| 90 {% endfor %} | 90 {% endfor %} |
| 91 } | 91 } |
| 92 | 92 |
| 93 v8::Local<v8::Value> {{cpp_class}}::toV8Impl(v8::Local<v8::Object> creationConte
xt, v8::Isolate* isolate) const | 93 v8::Local<v8::Value> {{cpp_class}}::toV8Impl(v8::Local<v8::Object> creationConte
xt, v8::Isolate* isolate) const |
| 94 { | 94 { |
| 95 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); | 95 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); |
| 96 if (!toV8{{cpp_class}}(*this, v8Object, creationContext, isolate)) | 96 if (!toV8{{cpp_class}}(*this, v8Object, creationContext, isolate)) |
| 97 return v8::Local<v8::Value>(); | 97 return v8::Undefined(isolate); |
| 98 return v8Object; | 98 return v8Object; |
| 99 } | 99 } |
| 100 | 100 |
| 101 bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
ry, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) | 101 bool toV8{{cpp_class}}(const {{cpp_class}}& impl, v8::Local<v8::Object> dictiona
ry, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) |
| 102 { | 102 { |
| 103 {% if parent_v8_class %} | 103 {% if parent_v8_class %} |
| 104 if (!toV8{{parent_cpp_class}}(impl, dictionary, creationContext, isolate)) | 104 if (!toV8{{parent_cpp_class}}(impl, dictionary, creationContext, isolate)) |
| 105 return false; | 105 return false; |
| 106 | 106 |
| 107 {% endif %} | 107 {% endif %} |
| (...skipping 25 matching lines...) Expand all Loading... |
| 133 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 133 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
| 134 { | 134 { |
| 135 {{cpp_class}} impl; | 135 {{cpp_class}} impl; |
| 136 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); | 136 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); |
| 137 return impl; | 137 return impl; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| 141 | 141 |
| 142 {% endfilter %}{# format_blink_cpp_source_code #} | 142 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |