OLD | NEW |
1 {% from 'utilities.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 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 return; | 55 return; |
56 {% else %} | 56 {% else %} |
57 // Do nothing. | 57 // Do nothing. |
58 {% endif %} | 58 {% endif %} |
59 {% if member.is_nullable %} | 59 {% if member.is_nullable %} |
60 } else if ({{member.name}}Value->IsNull()) { | 60 } else if ({{member.name}}Value->IsNull()) { |
61 impl.{{member.null_setter_name}}(); | 61 impl.{{member.null_setter_name}}(); |
62 {% endif %} | 62 {% endif %} |
63 } else { | 63 } else { |
64 {% if member.deprecate_as %} | 64 {% if member.deprecate_as %} |
65 UseCounter::countDeprecationIfNotPrivateScript(isolate, callingExecu
tionContext(isolate), UseCounter::{{member.deprecate_as}}); | 65 UseCounter::countDeprecationIfNotPrivateScript(isolate, currentExecu
tionContext(isolate), UseCounter::{{member.deprecate_as}}); |
66 {% endif %} | 66 {% endif %} |
67 {{v8_value_to_local_cpp_value(member) | indent(12)}} | 67 {{v8_value_to_local_cpp_value(member) | indent(12)}} |
68 {% if member.is_interface_type %} | 68 {% if member.is_interface_type %} |
69 if (!{{member.name}} && !{{member.name}}Value->IsNull()) { | 69 if (!{{member.name}} && !{{member.name}}Value->IsNull()) { |
70 exceptionState.throwTypeError("member {{member.name}} is not of
type {{member.idl_type}}."); | 70 exceptionState.throwTypeError("member {{member.name}} is not of
type {{member.idl_type}}."); |
71 return; | 71 return; |
72 } | 72 } |
73 {% endif %} | 73 {% endif %} |
74 {% if member.enum_values %} | 74 {% if member.enum_values %} |
75 {{declare_enum_validation_variable(member.enum_values) | indent(12)}
} | 75 {{declare_enum_validation_variable(member.enum_values) | indent(12)}
} |
(...skipping 48 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 |