| OLD | NEW |
| 1 {% from 'conversions.cpp' import declare_enum_validation_variable %} | 1 {% from 'utilities.cpp' import declare_enum_validation_variable %} |
| 2 {% include 'copyright_block.txt' %} | 2 {% include 'copyright_block.txt' %} |
| 3 #include "{{v8_original_class}}.h" | 3 #include "{{v8_original_class}}.h" |
| 4 | 4 |
| 5 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} | 5 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} |
| 6 #include "{{filename}}" | 6 #include "{{filename}}" |
| 7 {% endfor %} | 7 {% endfor %} |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} | 11 {% from 'utilities.cpp' import v8_value_to_local_cpp_value %} |
| 12 void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
cpp_class}}& impl, ExceptionState& exceptionState) | 12 void {{v8_class}}::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, {{
cpp_class}}& impl, ExceptionState& exceptionState) |
| 13 { | 13 { |
| 14 if (isUndefinedOrNull(v8Value)) | 14 if (isUndefinedOrNull(v8Value)) |
| 15 return; | 15 return; |
| 16 if (!v8Value->IsObject()) { | 16 if (!v8Value->IsObject()) { |
| 17 {% if use_permissive_dictionary_conversion %} | 17 {% if use_permissive_dictionary_conversion %} |
| 18 // Do nothing. | 18 // Do nothing. |
| 19 return; | 19 return; |
| 20 {% else %} | 20 {% else %} |
| 21 exceptionState.throwTypeError("cannot convert to dictionary."); | 21 exceptionState.throwTypeError("cannot convert to dictionary."); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 126 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
| 127 { | 127 { |
| 128 {{cpp_class}} impl; | 128 {{cpp_class}} impl; |
| 129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); | 129 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); |
| 130 return impl; | 130 return impl; |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace blink | 133 } // namespace blink |
| OLD | NEW |