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()); |
11 {% if getter.is_raises_exception %} | 11 {% if getter.is_raises_exception %} |
12 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); | 12 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); |
13 {% endif %} | 13 {% endif %} |
14 {% set getter_name = getter.name or 'anonymousIndexedGetter' %} | 14 {% set getter_name = getter.name or 'anonymousIndexedGetter' %} |
15 {% set getter_arguments = ['index'] %} | 15 {% set getter_arguments = ['index'] %} |
16 {% if getter.is_call_with_script_state %} | 16 {% if getter.is_call_with_script_state %} |
17 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 17 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
18 {% set getter_arguments = ['scriptState'] + getter_arguments %} | 18 {% set getter_arguments = ['scriptState'] + getter_arguments %} |
19 {% endif %} | 19 {% endif %} |
20 {% if getter.is_raises_exception %} | 20 {% if getter.is_raises_exception %} |
21 {% set getter_arguments = getter_arguments + ['exceptionState'] %} | 21 {% set getter_arguments = getter_arguments + ['exceptionState'] %} |
22 {% endif %} | 22 {% endif %} |
23 {{getter.cpp_type}} result = impl->{{getter_name}}({{getter_arguments | join
(', ')}}); | 23 {{getter.cpp_type}} result = impl->{{getter_name}}({{getter_arguments | join
(', ')}}); |
24 {% if getter.is_raises_exception %} | 24 {% if getter.is_raises_exception %} |
25 if (exceptionState.throwIfNeeded()) | 25 if (exceptionState.hadException()) |
26 return; | 26 return; |
27 {% endif %} | 27 {% endif %} |
28 if ({{getter.is_null_expression}}) | 28 if ({{getter.is_null_expression}}) |
29 return; | 29 return; |
30 {{getter.v8_set_return_value}}; | 30 {{getter.v8_set_return_value}}; |
31 } | 31 } |
32 | 32 |
33 {% endif %} | 33 {% endif %} |
34 {% endblock %} | 34 {% endblock %} |
35 | 35 |
(...skipping 25 matching lines...) Expand all Loading... |
61 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 61 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
62 {{v8_value_to_local_cpp_value(setter) | indent}} | 62 {{v8_value_to_local_cpp_value(setter) | indent}} |
63 {% if setter.has_exception_state %} | 63 {% if setter.has_exception_state %} |
64 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); | 64 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "{{inter
face_name}}", info.Holder(), info.GetIsolate()); |
65 {% endif %} | 65 {% endif %} |
66 {% if setter.has_type_checking_interface %} | 66 {% if setter.has_type_checking_interface %} |
67 {# Type checking for interface types (if interface not implemented, throw | 67 {# Type checking for interface types (if interface not implemented, throw |
68 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} | 68 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} |
69 if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value)
{% endif %}) { | 69 if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value)
{% endif %}) { |
70 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); | 70 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); |
71 exceptionState.throwIfNeeded(); | |
72 return; | 71 return; |
73 } | 72 } |
74 {% endif %} | 73 {% endif %} |
75 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} | 74 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} |
76 {% set setter_arguments = ['index', 'propertyValue'] %} | 75 {% set setter_arguments = ['index', 'propertyValue'] %} |
77 {% if setter.is_call_with_script_state %} | 76 {% if setter.is_call_with_script_state %} |
78 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 77 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
79 {% set setter_arguments = ['scriptState'] + setter_arguments %} | 78 {% set setter_arguments = ['scriptState'] + setter_arguments %} |
80 {% endif %} | 79 {% endif %} |
81 {% if setter.is_raises_exception %} | 80 {% if setter.is_raises_exception %} |
82 {% set setter_arguments = setter_arguments + ['exceptionState'] %} | 81 {% set setter_arguments = setter_arguments + ['exceptionState'] %} |
83 {% endif %} | 82 {% endif %} |
84 bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); | 83 bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); |
85 {% if setter.is_raises_exception %} | 84 {% if setter.is_raises_exception %} |
86 if (exceptionState.throwIfNeeded()) | 85 if (exceptionState.hadException()) |
87 return; | 86 return; |
88 {% endif %} | 87 {% endif %} |
89 if (!result) | 88 if (!result) |
90 return; | 89 return; |
91 v8SetReturnValue(info, v8Value); | 90 v8SetReturnValue(info, v8Value); |
92 } | 91 } |
93 | 92 |
94 {% endif %} | 93 {% endif %} |
95 {% endblock %} | 94 {% endblock %} |
96 | 95 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 {% set deleter_arguments = ['index'] %} | 128 {% set deleter_arguments = ['index'] %} |
130 {% if deleter.is_call_with_script_state %} | 129 {% if deleter.is_call_with_script_state %} |
131 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 130 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
132 {% set deleter_arguments = ['scriptState'] + deleter_arguments %} | 131 {% set deleter_arguments = ['scriptState'] + deleter_arguments %} |
133 {% endif %} | 132 {% endif %} |
134 {% if deleter.is_raises_exception %} | 133 {% if deleter.is_raises_exception %} |
135 {% set deleter_arguments = deleter_arguments + ['exceptionState'] %} | 134 {% set deleter_arguments = deleter_arguments + ['exceptionState'] %} |
136 {% endif %} | 135 {% endif %} |
137 DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', '
)}}); | 136 DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', '
)}}); |
138 {% if deleter.is_raises_exception %} | 137 {% if deleter.is_raises_exception %} |
139 if (exceptionState.throwIfNeeded()) | 138 if (exceptionState.hadException()) |
140 return; | 139 return; |
141 {% endif %} | 140 {% endif %} |
142 if (result != DeleteUnknownProperty) | 141 if (result != DeleteUnknownProperty) |
143 return v8SetReturnValueBool(info, result == DeleteSuccess); | 142 return v8SetReturnValueBool(info, result == DeleteSuccess); |
144 } | 143 } |
145 | 144 |
146 {% endif %} | 145 {% endif %} |
147 {% endblock %} | 146 {% endblock %} |
148 | 147 |
149 | 148 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 {% if getter.is_call_with_script_state %} | 182 {% if getter.is_call_with_script_state %} |
184 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 183 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
185 {% endif %} | 184 {% endif %} |
186 {% if getter.use_output_parameter_for_result %} | 185 {% if getter.use_output_parameter_for_result %} |
187 {{getter.cpp_type}} result; | 186 {{getter.cpp_type}} result; |
188 {{getter.cpp_value}}; | 187 {{getter.cpp_value}}; |
189 {% else %} | 188 {% else %} |
190 {{getter.cpp_type}} result = {{getter.cpp_value}}; | 189 {{getter.cpp_type}} result = {{getter.cpp_value}}; |
191 {% endif %} | 190 {% endif %} |
192 {% if getter.is_raises_exception %} | 191 {% if getter.is_raises_exception %} |
193 if (exceptionState.throwIfNeeded()) | 192 if (exceptionState.hadException()) |
194 return; | 193 return; |
195 {% endif %} | 194 {% endif %} |
196 if ({{getter.is_null_expression}}) | 195 if ({{getter.is_null_expression}}) |
197 return; | 196 return; |
198 {{getter.v8_set_return_value}}; | 197 {{getter.v8_set_return_value}}; |
199 } | 198 } |
200 | 199 |
201 {% endif %} | 200 {% endif %} |
202 {% endblock %} | 201 {% endblock %} |
203 | 202 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 {# v8_value_to_local_cpp_value('DOMString', 'nameString', 'propertyName') #} | 236 {# v8_value_to_local_cpp_value('DOMString', 'nameString', 'propertyName') #} |
238 V8StringResource<> propertyName(nameString); | 237 V8StringResource<> propertyName(nameString); |
239 if (!propertyName.prepare()) | 238 if (!propertyName.prepare()) |
240 return; | 239 return; |
241 {{v8_value_to_local_cpp_value(setter) | indent}} | 240 {{v8_value_to_local_cpp_value(setter) | indent}} |
242 {% if setter.has_type_checking_interface %} | 241 {% if setter.has_type_checking_interface %} |
243 {# Type checking for interface types (if interface not implemented, throw | 242 {# Type checking for interface types (if interface not implemented, throw |
244 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} | 243 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} |
245 if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value)
{% endif %}) { | 244 if (!propertyValue{% if setter.is_nullable %} && !isUndefinedOrNull(v8Value)
{% endif %}) { |
246 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); | 245 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); |
247 exceptionState.throwIfNeeded(); | |
248 return; | 246 return; |
249 } | 247 } |
250 {% endif %} | 248 {% endif %} |
251 {% if setter.is_call_with_script_state %} | 249 {% if setter.is_call_with_script_state %} |
252 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 250 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
253 {% endif %} | 251 {% endif %} |
254 {% set setter_name = setter.name or 'anonymousNamedSetter' %} | 252 {% set setter_name = setter.name or 'anonymousNamedSetter' %} |
255 {% set setter_arguments = ['propertyName', 'propertyValue'] %} | 253 {% set setter_arguments = ['propertyName', 'propertyValue'] %} |
256 {% if setter.is_call_with_script_state %} | 254 {% if setter.is_call_with_script_state %} |
257 {% set setter_arguments = ['scriptState'] + setter_arguments %} | 255 {% set setter_arguments = ['scriptState'] + setter_arguments %} |
258 {% endif %} | 256 {% endif %} |
259 {% if setter.is_raises_exception %} | 257 {% if setter.is_raises_exception %} |
260 {% set setter_arguments = setter_arguments + ['exceptionState'] %} | 258 {% set setter_arguments = setter_arguments + ['exceptionState'] %} |
261 {% endif %} | 259 {% endif %} |
262 bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); | 260 bool result = impl->{{setter_name}}({{setter_arguments | join(', ')}}); |
263 {% if setter.is_raises_exception %} | 261 {% if setter.is_raises_exception %} |
264 if (exceptionState.throwIfNeeded()) | 262 if (exceptionState.hadException()) |
265 return; | 263 return; |
266 {% endif %} | 264 {% endif %} |
267 if (!result) | 265 if (!result) |
268 return; | 266 return; |
269 v8SetReturnValue(info, v8Value); | 267 v8SetReturnValue(info, v8Value); |
270 } | 268 } |
271 | 269 |
272 {% endif %} | 270 {% endif %} |
273 {% endblock %} | 271 {% endblock %} |
274 | 272 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 305 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
308 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 306 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
309 v8::String::Utf8Value namedProperty(name); | 307 v8::String::Utf8Value namedProperty(name); |
310 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); | 308 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"{{interface_name}}", info.Holder(), info.GetIsolate()); |
311 {% set getter_arguments = ['propertyName', 'exceptionState'] %} | 309 {% set getter_arguments = ['propertyName', 'exceptionState'] %} |
312 {% if getter.is_call_with_script_state %} | 310 {% if getter.is_call_with_script_state %} |
313 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 311 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
314 {% set getter_arguments = ['scriptState'] + getter_arguments %} | 312 {% set getter_arguments = ['scriptState'] + getter_arguments %} |
315 {% endif %} | 313 {% endif %} |
316 bool result = impl->namedPropertyQuery({{getter_arguments | join(', ')}}); | 314 bool result = impl->namedPropertyQuery({{getter_arguments | join(', ')}}); |
317 if (exceptionState.throwIfNeeded()) | 315 if (exceptionState.hadException()) |
318 return; | 316 return; |
319 if (!result) | 317 if (!result) |
320 return; | 318 return; |
321 v8SetReturnValueInt(info, v8::None); | 319 v8SetReturnValueInt(info, v8::None); |
322 } | 320 } |
323 | 321 |
324 {% endif %} | 322 {% endif %} |
325 {% endblock %} | 323 {% endblock %} |
326 | 324 |
327 | 325 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 {% set deleter_name = deleter.name or 'anonymousNamedDeleter' %} | 360 {% set deleter_name = deleter.name or 'anonymousNamedDeleter' %} |
363 {% set deleter_arguments = ['propertyName'] %} | 361 {% set deleter_arguments = ['propertyName'] %} |
364 {% if deleter.is_call_with_script_state %} | 362 {% if deleter.is_call_with_script_state %} |
365 {% set deleter_arguments = ['scriptState'] + deleter_arguments %} | 363 {% set deleter_arguments = ['scriptState'] + deleter_arguments %} |
366 {% endif %} | 364 {% endif %} |
367 {% if deleter.is_raises_exception %} | 365 {% if deleter.is_raises_exception %} |
368 {% set deleter_arguments = deleter_arguments + ['exceptionState'] %} | 366 {% set deleter_arguments = deleter_arguments + ['exceptionState'] %} |
369 {% endif %} | 367 {% endif %} |
370 DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', '
)}}); | 368 DeleteResult result = impl->{{deleter_name}}({{deleter_arguments | join(', '
)}}); |
371 {% if deleter.is_raises_exception %} | 369 {% if deleter.is_raises_exception %} |
372 if (exceptionState.throwIfNeeded()) | 370 if (exceptionState.hadException()) |
373 return; | 371 return; |
374 {% endif %} | 372 {% endif %} |
375 if (result != DeleteUnknownProperty) | 373 if (result != DeleteUnknownProperty) |
376 return v8SetReturnValueBool(info, result == DeleteSuccess); | 374 return v8SetReturnValueBool(info, result == DeleteSuccess); |
377 } | 375 } |
378 | 376 |
379 {% endif %} | 377 {% endif %} |
380 {% endblock %} | 378 {% endblock %} |
381 | 379 |
382 | 380 |
(...skipping 22 matching lines...) Expand all Loading... |
405 {##############################################################################} | 403 {##############################################################################} |
406 {% block named_property_enumerator %} | 404 {% block named_property_enumerator %} |
407 {% if named_property_getter and named_property_getter.is_enumerable and | 405 {% if named_property_getter and named_property_getter.is_enumerable and |
408 not named_property_getter.is_custom_property_enumerator %} | 406 not named_property_getter.is_custom_property_enumerator %} |
409 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 407 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
410 { | 408 { |
411 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 409 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
412 Vector<String> names; | 410 Vector<String> names; |
413 ExceptionState exceptionState(ExceptionState::EnumerationContext, "{{interfa
ce_name}}", info.Holder(), info.GetIsolate()); | 411 ExceptionState exceptionState(ExceptionState::EnumerationContext, "{{interfa
ce_name}}", info.Holder(), info.GetIsolate()); |
414 impl->namedPropertyEnumerator(names, exceptionState); | 412 impl->namedPropertyEnumerator(names, exceptionState); |
415 if (exceptionState.throwIfNeeded()) | 413 if (exceptionState.hadException()) |
416 return; | 414 return; |
417 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); | 415 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size(
)); |
418 for (size_t i = 0; i < names.size(); ++i) { | 416 for (size_t i = 0; i < names.size(); ++i) { |
419 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) | 417 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur
rentContext(), i, v8String(info.GetIsolate(), names[i])))) |
420 return; | 418 return; |
421 } | 419 } |
422 v8SetReturnValue(info, v8names); | 420 v8SetReturnValue(info, v8names); |
423 } | 421 } |
424 | 422 |
425 {% endif %} | 423 {% endif %} |
(...skipping 24 matching lines...) Expand all Loading... |
450 { | 448 { |
451 if (!name->IsString()) | 449 if (!name->IsString()) |
452 return; | 450 return; |
453 v8::Local<v8::Object> holder = {{v8_class}}::findInstanceInPrototypeChain(in
fo.Holder(), info.GetIsolate()); | 451 v8::Local<v8::Object> holder = {{v8_class}}::findInstanceInPrototypeChain(in
fo.Holder(), info.GetIsolate()); |
454 if (holder.IsEmpty()) | 452 if (holder.IsEmpty()) |
455 return; | 453 return; |
456 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); | 454 {{cpp_class}}* impl = {{v8_class}}::toImpl(holder); |
457 v8::String::Utf8Value attributeName(name); | 455 v8::String::Utf8Value attributeName(name); |
458 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"{{interface_name}}", info.Holder(), info.GetIsolate()); | 456 ExceptionState exceptionState(ExceptionState::SetterContext, *attributeName,
"{{interface_name}}", info.Holder(), info.GetIsolate()); |
459 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), impl, exceptionState)) { | 457 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()
), impl, exceptionState)) { |
460 exceptionState.throwIfNeeded(); | |
461 return; | 458 return; |
462 } | 459 } |
463 | 460 |
464 {# The findInstanceInPrototypeChain() call above only returns a non-empty ha
ndle if info.Holder() is an Object. #} | 461 {# The findInstanceInPrototypeChain() call above only returns a non-empty ha
ndle if info.Holder() is an Object. #} |
465 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), v8::L
ocal<v8::Object>::Cast(info.Holder()), name.As<v8::String>(), v8Value); | 462 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), v8::L
ocal<v8::Object>::Cast(info.Holder()), name.As<v8::String>(), v8Value); |
466 } | 463 } |
467 | 464 |
468 static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name> name
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 465 static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name> name
, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
469 { | 466 { |
470 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, v8Value,
info); | 467 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, v8Value,
info); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 } | 531 } |
535 {% endfor %} | 532 {% endfor %} |
536 break; | 533 break; |
537 {% endfor %} | 534 {% endfor %} |
538 default: | 535 default: |
539 {# Invalid arity, throw error #} | 536 {# Invalid arity, throw error #} |
540 {# Report full list of valid arities if gaps and above minimum #} | 537 {# Report full list of valid arities if gaps and above minimum #} |
541 {% if constructor_overloads.valid_arities %} | 538 {% if constructor_overloads.valid_arities %} |
542 if (info.Length() >= {{constructor_overloads.length}}) { | 539 if (info.Length() >= {{constructor_overloads.length}}) { |
543 setArityTypeError(exceptionState, "{{constructor_overloads.valid_ari
ties}}", info.Length()); | 540 setArityTypeError(exceptionState, "{{constructor_overloads.valid_ari
ties}}", info.Length()); |
544 exceptionState.throwIfNeeded(); | |
545 return; | 541 return; |
546 } | 542 } |
547 {% endif %} | 543 {% endif %} |
548 {# Otherwise just report "not enough arguments" #} | 544 {# Otherwise just report "not enough arguments" #} |
549 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{co
nstructor_overloads.length}}, info.Length())); | 545 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments({{co
nstructor_overloads.length}}, info.Length())); |
550 exceptionState.throwIfNeeded(); | |
551 return; | 546 return; |
552 } | 547 } |
553 {# No match, throw error #} | 548 {# No match, throw error #} |
554 exceptionState.throwTypeError("No matching constructor signature."); | 549 exceptionState.throwTypeError("No matching constructor signature."); |
555 exceptionState.throwIfNeeded(); | |
556 } | 550 } |
557 | 551 |
558 {% endif %} | 552 {% endif %} |
559 {% endblock %} | 553 {% endblock %} |
560 | 554 |
561 {##############################################################################} | 555 {##############################################################################} |
562 {% block visit_dom_wrapper %} | 556 {% block visit_dom_wrapper %} |
563 {% if set_wrapper_reference_from or set_wrapper_reference_to %} | 557 {% if set_wrapper_reference_from or set_wrapper_reference_to %} |
564 void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script
Wrappable, const v8::Persistent<v8::Object>& wrapper) | 558 void {{v8_class}}::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* script
Wrappable, const v8::Persistent<v8::Object>& wrapper) |
565 { | 559 { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 | 934 |
941 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 935 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
942 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 936 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
943 { | 937 { |
944 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
945 } | 939 } |
946 | 940 |
947 {% endfor %} | 941 {% endfor %} |
948 {% endif %} | 942 {% endif %} |
949 {% endblock %} | 943 {% endblock %} |
OLD | NEW |