| OLD | NEW |
| 1 {% extends 'interface_base.cpp.tmpl' %} | 1 {% extends 'interface_base.cpp.tmpl' %} |
| 2 | 2 |
| 3 {% set has_prepare_prototype_and_interface_object = | 3 {% set has_prepare_prototype_and_interface_object = |
| 4 unscopables or has_conditional_attributes_on_prototype or | 4 unscopables or has_conditional_attributes_on_prototype or |
| 5 methods | conditionally_exposed(is_partial) %} | 5 methods | conditionally_exposed(is_partial) %} |
| 6 {% set prepare_prototype_and_interface_object_func = | 6 {% set prepare_prototype_and_interface_object_func = |
| 7 '%s::preparePrototypeAndInterfaceObject' % v8_class | 7 '%s::preparePrototypeAndInterfaceObject' % v8_class |
| 8 if has_prepare_prototype_and_interface_object | 8 if has_prepare_prototype_and_interface_object |
| 9 else 'nullptr' %} | 9 else 'nullptr' %} |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 {% endif %} | 43 {% endif %} |
| 44 {% endblock %} | 44 {% endblock %} |
| 45 | 45 |
| 46 | 46 |
| 47 {##############################################################################} | 47 {##############################################################################} |
| 48 {% block indexed_property_getter_callback %} | 48 {% block indexed_property_getter_callback %} |
| 49 {% if indexed_property_getter or named_property_getter %} | 49 {% if indexed_property_getter or named_property_getter %} |
| 50 {% set getter = indexed_property_getter or named_property_getter %} | 50 {% set getter = indexed_property_getter or named_property_getter %} |
| 51 void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInf
o<v8::Value>& info) { | 51 {{exported}}void indexedPropertyGetterCallback(uint32_t index, const v8::Propert
yCallbackInfo<v8::Value>& info) { |
| 52 {% if indexed_property_getter %} | 52 {% if indexed_property_getter %} |
| 53 | 53 |
| 54 {% if getter.is_custom %} | 54 {% if getter.is_custom %} |
| 55 {{v8_class}}::indexedPropertyGetterCustom(index, info); | 55 {{v8_class}}::indexedPropertyGetterCustom(index, info); |
| 56 {% else %} | 56 {% else %} |
| 57 {{cpp_class}}V8Internal::indexedPropertyGetter(index, info); | 57 {{cpp_class}}V8Internal::indexedPropertyGetter(index, info); |
| 58 {% endif %} | 58 {% endif %} |
| 59 | 59 |
| 60 {% else %}{# otherwise, named property #} | 60 {% else %}{# otherwise, named property #} |
| 61 | 61 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 {% endif %} | 117 {% endif %} |
| 118 {% endblock %} | 118 {% endblock %} |
| 119 | 119 |
| 120 | 120 |
| 121 {##############################################################################} | 121 {##############################################################################} |
| 122 {% block indexed_property_setter_callback %} | 122 {% block indexed_property_setter_callback %} |
| 123 {% if indexed_property_setter or named_property_setter %} | 123 {% if indexed_property_setter or named_property_setter %} |
| 124 {% set setter = indexed_property_setter or named_property_setter %} | 124 {% set setter = indexed_property_setter or named_property_setter %} |
| 125 void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) { | 125 {{exported}}void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Val
ue> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 126 {% if setter.is_ce_reactions %} | 126 {% if setter.is_ce_reactions %} |
| 127 CEReactionsScope ceReactionsScope; | 127 CEReactionsScope ceReactionsScope; |
| 128 {% endif %} | 128 {% endif %} |
| 129 | 129 |
| 130 {% if indexed_property_setter %} | 130 {% if indexed_property_setter %} |
| 131 | 131 |
| 132 {% if setter.is_custom %} | 132 {% if setter.is_custom %} |
| 133 {{v8_class}}::indexedPropertySetterCustom(index, v8Value, info); | 133 {{v8_class}}::indexedPropertySetterCustom(index, v8Value, info); |
| 134 {% else %} | 134 {% else %} |
| 135 {{cpp_class}}V8Internal::indexedPropertySetter(index, v8Value, info); | 135 {{cpp_class}}V8Internal::indexedPropertySetter(index, v8Value, info); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 {% endif %} | 185 {% endif %} |
| 186 {% endblock %} | 186 {% endblock %} |
| 187 | 187 |
| 188 | 188 |
| 189 {##############################################################################} | 189 {##############################################################################} |
| 190 {% block indexed_property_deleter_callback %} | 190 {% block indexed_property_deleter_callback %} |
| 191 {% if indexed_property_deleter or named_property_deleter %} | 191 {% if indexed_property_deleter or named_property_deleter %} |
| 192 {% set deleter = indexed_property_deleter or named_property_deleter %} | 192 {% set deleter = indexed_property_deleter or named_property_deleter %} |
| 193 void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackIn
fo<v8::Boolean>& info) { | 193 {{exported}}void indexedPropertyDeleterCallback(uint32_t index, const v8::Proper
tyCallbackInfo<v8::Boolean>& info) { |
| 194 {% if deleter.is_ce_reactions %} | 194 {% if deleter.is_ce_reactions %} |
| 195 CEReactionsScope ceReactionsScope; | 195 CEReactionsScope ceReactionsScope; |
| 196 {% endif %} | 196 {% endif %} |
| 197 | 197 |
| 198 {% if indexed_property_deleter %} | 198 {% if indexed_property_deleter %} |
| 199 | 199 |
| 200 {% if deleter.is_custom %} | 200 {% if deleter.is_custom %} |
| 201 {{v8_class}}::indexedPropertyDeleterCustom(index, info); | 201 {{v8_class}}::indexedPropertyDeleterCustom(index, info); |
| 202 {% else %} | 202 {% else %} |
| 203 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info); | 203 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 | 247 |
| 248 {% endif %} | 248 {% endif %} |
| 249 {% endblock %} | 249 {% endblock %} |
| 250 | 250 |
| 251 | 251 |
| 252 {##############################################################################} | 252 {##############################################################################} |
| 253 {% block named_property_getter_callback %} | 253 {% block named_property_getter_callback %} |
| 254 {% if named_property_getter %} | 254 {% if named_property_getter %} |
| 255 {% set getter = named_property_getter %} | 255 {% set getter = named_property_getter %} |
| 256 void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCal
lbackInfo<v8::Value>& info) { | 256 {{exported}}void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8:
:PropertyCallbackInfo<v8::Value>& info) { |
| 257 if (!name->IsString()) | 257 if (!name->IsString()) |
| 258 return; | 258 return; |
| 259 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 259 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| 260 | 260 |
| 261 {% if getter.is_custom %} | 261 {% if getter.is_custom %} |
| 262 {{v8_class}}::namedPropertyGetterCustom(propertyName, info); | 262 {{v8_class}}::namedPropertyGetterCustom(propertyName, info); |
| 263 {% else %} | 263 {% else %} |
| 264 {{cpp_class}}V8Internal::namedPropertyGetter(propertyName, info); | 264 {{cpp_class}}V8Internal::namedPropertyGetter(propertyName, info); |
| 265 {% endif %} | 265 {% endif %} |
| 266 } | 266 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 313 } |
| 314 | 314 |
| 315 {% endif %} | 315 {% endif %} |
| 316 {% endblock %} | 316 {% endblock %} |
| 317 | 317 |
| 318 | 318 |
| 319 {##############################################################################} | 319 {##############################################################################} |
| 320 {% block named_property_setter_callback %} | 320 {% block named_property_setter_callback %} |
| 321 {% if named_property_setter %} | 321 {% if named_property_setter %} |
| 322 {% set setter = named_property_setter %} | 322 {% set setter = named_property_setter %} |
| 323 void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { | 323 {{exported}}void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local
<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) { |
| 324 if (!name->IsString()) | 324 if (!name->IsString()) |
| 325 return; | 325 return; |
| 326 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 326 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| 327 | 327 |
| 328 {% if setter.is_ce_reactions %} | 328 {% if setter.is_ce_reactions %} |
| 329 CEReactionsScope ceReactionsScope; | 329 CEReactionsScope ceReactionsScope; |
| 330 {% endif %} | 330 {% endif %} |
| 331 | 331 |
| 332 {% if setter.is_custom %} | 332 {% if setter.is_custom %} |
| 333 {{v8_class}}::namedPropertySetterCustom(propertyName, v8Value, info); | 333 {{v8_class}}::namedPropertySetterCustom(propertyName, v8Value, info); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 374 } |
| 375 | 375 |
| 376 {% endif %} | 376 {% endif %} |
| 377 {% endblock %} | 377 {% endblock %} |
| 378 | 378 |
| 379 | 379 |
| 380 {##############################################################################} | 380 {##############################################################################} |
| 381 {% block named_property_deleter_callback %} | 381 {% block named_property_deleter_callback %} |
| 382 {% if named_property_deleter %} | 382 {% if named_property_deleter %} |
| 383 {% set deleter = named_property_deleter %} | 383 {% set deleter = named_property_deleter %} |
| 384 void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::PropertyCa
llbackInfo<v8::Boolean>& info) { | 384 {{exported}}void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8
::PropertyCallbackInfo<v8::Boolean>& info) { |
| 385 if (!name->IsString()) | 385 if (!name->IsString()) |
| 386 return; | 386 return; |
| 387 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 387 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| 388 | 388 |
| 389 {% if deleter.is_ce_reactions %} | 389 {% if deleter.is_ce_reactions %} |
| 390 CEReactionsScope ceReactionsScope; | 390 CEReactionsScope ceReactionsScope; |
| 391 {% endif %} | 391 {% endif %} |
| 392 | 392 |
| 393 {% if deleter.is_custom %} | 393 {% if deleter.is_custom %} |
| 394 {{v8_class}}::namedPropertyDeleterCustom(propertyName, info); | 394 {{v8_class}}::namedPropertyDeleterCustom(propertyName, info); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 } | 428 } |
| 429 | 429 |
| 430 {% endif %} | 430 {% endif %} |
| 431 {% endblock %} | 431 {% endblock %} |
| 432 | 432 |
| 433 | 433 |
| 434 {##############################################################################} | 434 {##############################################################################} |
| 435 {% block named_property_query_callback %} | 435 {% block named_property_query_callback %} |
| 436 {% if named_property_getter and named_property_getter.is_enumerable %} | 436 {% if named_property_getter and named_property_getter.is_enumerable %} |
| 437 {% set getter = named_property_getter %} | 437 {% set getter = named_property_getter %} |
| 438 void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::PropertyCall
backInfo<v8::Integer>& info) { | 438 {{exported}}void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::
PropertyCallbackInfo<v8::Integer>& info) { |
| 439 if (!name->IsString()) | 439 if (!name->IsString()) |
| 440 return; | 440 return; |
| 441 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); | 441 const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>()); |
| 442 | 442 |
| 443 {% if getter.is_custom_property_query %} | 443 {% if getter.is_custom_property_query %} |
| 444 {{v8_class}}::namedPropertyQueryCustom(propertyName, info); | 444 {{v8_class}}::namedPropertyQueryCustom(propertyName, info); |
| 445 {% else %} | 445 {% else %} |
| 446 {{cpp_class}}V8Internal::namedPropertyQuery(propertyName, info); | 446 {{cpp_class}}V8Internal::namedPropertyQuery(propertyName, info); |
| 447 {% endif %} | 447 {% endif %} |
| 448 } | 448 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 468 } | 468 } |
| 469 | 469 |
| 470 {% endif %} | 470 {% endif %} |
| 471 {% endblock %} | 471 {% endblock %} |
| 472 | 472 |
| 473 | 473 |
| 474 {##############################################################################} | 474 {##############################################################################} |
| 475 {% block named_property_enumerator_callback %} | 475 {% block named_property_enumerator_callback %} |
| 476 {% if named_property_getter and named_property_getter.is_enumerable %} | 476 {% if named_property_getter and named_property_getter.is_enumerable %} |
| 477 {% set getter = named_property_getter %} | 477 {% set getter = named_property_getter %} |
| 478 void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>&
info) { | 478 {{exported}}void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<
v8::Array>& info) { |
| 479 {% if getter.is_custom_property_enumerator %} | 479 {% if getter.is_custom_property_enumerator %} |
| 480 {{v8_class}}::namedPropertyEnumeratorCustom(info); | 480 {{v8_class}}::namedPropertyEnumeratorCustom(info); |
| 481 {% else %} | 481 {% else %} |
| 482 {{cpp_class}}V8Internal::namedPropertyEnumerator(info); | 482 {{cpp_class}}V8Internal::namedPropertyEnumerator(info); |
| 483 {% endif %} | 483 {% endif %} |
| 484 } | 484 } |
| 485 | 485 |
| 486 {% endif %} | 486 {% endif %} |
| 487 {% endblock %} | 487 {% endblock %} |
| 488 | 488 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 503 v8::String::Utf8Value attributeName(name); | 503 v8::String::Utf8Value attributeName(name); |
| 504 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "{{interface_name}}", *attributeName); | 504 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "{{interface_name}}", *attributeName); |
| 505 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()),
impl, exceptionState)) { | 505 if (!BindingSecurity::shouldAllowAccessTo(currentDOMWindow(info.GetIsolate()),
impl, exceptionState)) { |
| 506 return; | 506 return; |
| 507 } | 507 } |
| 508 | 508 |
| 509 {# The findInstanceInPrototypeChain() call above only returns a non-empty hand
le if info.Holder() is an Object. #} | 509 {# The findInstanceInPrototypeChain() call above only returns a non-empty hand
le if info.Holder() is an Object. #} |
| 510 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), v8::Loc
al<v8::Object>::Cast(info.Holder()), name.As<v8::String>(), v8Value); | 510 V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), v8::Loc
al<v8::Object>::Cast(info.Holder()), name.As<v8::String>(), v8Value); |
| 511 } | 511 } |
| 512 | 512 |
| 513 void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name> name, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) { | 513 {{exported}}void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local<v8::Name>
name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
{ |
| 514 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, v8Value, in
fo); | 514 {{cpp_class}}V8Internal::{{cpp_class}}OriginSafeMethodSetter(name, v8Value, in
fo); |
| 515 } | 515 } |
| 516 | 516 |
| 517 {% endif %} | 517 {% endif %} |
| 518 {% endblock %} | 518 {% endblock %} |
| 519 | 519 |
| 520 | 520 |
| 521 {##############################################################################} | 521 {##############################################################################} |
| 522 {% block named_constructor %} | 522 {% block named_constructor %} |
| 523 {% from 'methods.cpp.tmpl' import generate_constructor with context %} | 523 {% from 'methods.cpp.tmpl' import generate_constructor with context %} |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 } | 956 } |
| 957 | 957 |
| 958 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 958 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 959 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 959 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
| 960 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 960 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 961 } | 961 } |
| 962 | 962 |
| 963 {% endfor %} | 963 {% endfor %} |
| 964 {% endif %} | 964 {% endif %} |
| 965 {% endblock %} | 965 {% endblock %} |
| OLD | NEW |