OLD | NEW |
1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
2 | 2 |
3 {% from 'utilities.cpp.tmpl' import declare_enum_validation_variable %} | 3 {% from 'utilities.cpp.tmpl' 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 10 matching lines...) Expand all Loading... |
21 if (!v8Value->IsObject()) { | 21 if (!v8Value->IsObject()) { |
22 {% if use_permissive_dictionary_conversion %} | 22 {% if use_permissive_dictionary_conversion %} |
23 // Do nothing. | 23 // Do nothing. |
24 return; | 24 return; |
25 {% else %} | 25 {% else %} |
26 exceptionState.throwTypeError("cannot convert to dictionary."); | 26 exceptionState.throwTypeError("cannot convert to dictionary."); |
27 return; | 27 return; |
28 {% endif %} | 28 {% endif %} |
29 } | 29 } |
30 v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>(); | 30 v8::Local<v8::Object> v8Object = v8Value.As<v8::Object>(); |
31 (void)v8Object; | 31 ALLOW_UNUSED_LOCAL(v8Object); |
32 | 32 |
33 {% if parent_v8_class %} | 33 {% if parent_v8_class %} |
34 {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState); | 34 {{parent_v8_class}}::toImpl(isolate, v8Value, impl, exceptionState); |
35 if (exceptionState.hadException()) | 35 if (exceptionState.hadException()) |
36 return; | 36 return; |
37 | 37 |
38 {% endif %} | 38 {% endif %} |
39 {# Declare local variables only when the dictionary has members to avoid unuse
d variable warnings. #} | 39 {# Declare local variables only when the dictionary has members to avoid unuse
d variable warnings. #} |
40 {% if members %} | 40 {% if members %} |
41 v8::TryCatch block(isolate); | 41 v8::TryCatch block(isolate); |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 {{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 |
134 | 134 |
135 {% endfilter %}{# format_blink_cpp_source_code #} | 135 {% endfilter %}{# format_blink_cpp_source_code #} |
OLD | NEW |