| OLD | NEW |
| 1 {% from 'conversions.cpp' import declare_enum_validation_variable %} | 1 {% from 'conversions.cpp' import declare_enum_validation_variable %} |
| 2 {% include 'copyright_block.txt' %} | 2 {% include 'copyright_block.txt' %} |
| 3 #include "config.h" | 3 #include "config.h" |
| 4 #include "{{v8_original_class}}.h" | 4 #include "{{v8_original_class}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} | 6 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 {% if members %} | 34 {% if members %} |
| 35 v8::TryCatch block(isolate); | 35 v8::TryCatch block(isolate); |
| 36 v8::Local<v8::Object> v8Object; | 36 v8::Local<v8::Object> v8Object; |
| 37 if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block
)) { | 37 if (!v8Call(v8Value->ToObject(isolate->GetCurrentContext()), v8Object, block
)) { |
| 38 exceptionState.rethrowV8Exception(block.Exception()); | 38 exceptionState.rethrowV8Exception(block.Exception()); |
| 39 return; | 39 return; |
| 40 } | 40 } |
| 41 {% endif %} | 41 {% endif %} |
| 42 {% for member in members %} | 42 {% for member in members %} |
| 43 {% if member.runtime_enabled_function %} | 43 {% if member.runtime_enabled_function %} |
| 44 if ({{member.runtime_enabled_function}}()) { | 44 if ({{member.runtime_enabled_function}}) { |
| 45 {% else %} | 45 {% else %} |
| 46 { | 46 { |
| 47 {% endif %} | 47 {% endif %} |
| 48 v8::Local<v8::Value> {{member.name}}Value; | 48 v8::Local<v8::Value> {{member.name}}Value; |
| 49 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "{{me
mber.name}}")).ToLocal(&{{member.name}}Value)) { | 49 if (!v8Object->Get(isolate->GetCurrentContext(), v8String(isolate, "{{me
mber.name}}")).ToLocal(&{{member.name}}Value)) { |
| 50 exceptionState.rethrowV8Exception(block.Exception()); | 50 exceptionState.rethrowV8Exception(block.Exception()); |
| 51 return; | 51 return; |
| 52 } | 52 } |
| 53 if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined(
)) { | 53 if ({{member.name}}Value.IsEmpty() || {{member.name}}Value->IsUndefined(
)) { |
| 54 {% if member.is_required %} | 54 {% if member.is_required %} |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) | 127 {{cpp_class}} NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate
, v8::Local<v8::Value> value, ExceptionState& exceptionState) |
| 128 { | 128 { |
| 129 {{cpp_class}} impl; | 129 {{cpp_class}} impl; |
| 130 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); | 130 {{v8_class}}::toImpl(isolate, value, impl, exceptionState); |
| 131 return impl; | 131 return impl; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |