OLD | NEW |
1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
9 { | 9 { |
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 161 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
162 return; | 162 return; |
163 | 163 |
164 {% endif %} | 164 {% endif %} |
165 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 165 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
166 AtomicString propertyName = toCoreAtomicString(name); | 166 AtomicString propertyName = toCoreAtomicString(name); |
167 {% if getter.is_raises_exception %} | 167 {% if getter.is_raises_exception %} |
168 v8::String::Utf8Value namedProperty(name); | 168 v8::String::Utf8Value namedProperty(name); |
169 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); | 169 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); |
170 {% endif %} | 170 {% endif %} |
171 {% if getter.union_arguments %} | 171 {% if getter.union_result_members %} |
172 {{union_type_method_call_and_set_return_value(getter) | indent}} | 172 {{union_type_method_call_and_set_return_value(getter) | indent}} |
173 {% else %} | 173 {% else %} |
174 {{getter.cpp_type}} result = {{getter.cpp_value}}; | 174 {{getter.cpp_type}} result = {{getter.cpp_value}}; |
175 {% if getter.is_raises_exception %} | 175 {% if getter.is_raises_exception %} |
176 if (exceptionState.throwIfNeeded()) | 176 if (exceptionState.throwIfNeeded()) |
177 return; | 177 return; |
178 {% endif %} | 178 {% endif %} |
179 if ({{getter.is_null_expression}}) | 179 if ({{getter.is_null_expression}}) |
180 return; | 180 return; |
181 {{getter.v8_set_return_value}}; | 181 {{getter.v8_set_return_value}}; |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 } | 1021 } |
1022 | 1022 |
1023 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 1023 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
1024 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 1024 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
1025 { | 1025 { |
1026 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 1026 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
1027 } | 1027 } |
1028 {% endfor %} | 1028 {% endfor %} |
1029 {% endif %} | 1029 {% endif %} |
1030 {% endblock %} | 1030 {% endblock %} |
OLD | NEW |