| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "{{name}}"), v8
::True(isolate)).FromJust(); | 895 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "{{name}}"), v8
::True(isolate)).FromJust(); |
| 896 {% endfilter %} | 896 {% endfilter %} |
| 897 {% endfor %} | 897 {% endfor %} |
| 898 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).Fro
mJust(); | 898 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).Fro
mJust(); |
| 899 {% endmacro %} | 899 {% endmacro %} |
| 900 | 900 |
| 901 | 901 |
| 902 {##############################################################################} | 902 {##############################################################################} |
| 903 {% macro install_conditionally_enabled_attributes_on_prototype() %} | 903 {% macro install_conditionally_enabled_attributes_on_prototype() %} |
| 904 {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} | 904 {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} |
| 905 ExecutionContext* executionContext = toExecutionContext(context); | 905 { |
| 906 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla
te); | 906 ExecutionContext* executionContext = toExecutionContext(context); |
| 907 {% for attribute in attributes if (attribute.exposed_test or attribute.secure_co
ntext_test) and attribute.on_prototype %} | 907 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 908 {% filter exposed(attribute.exposed_test) %} | 908 {% for attribute in attributes if (attribute.exposed_test or attribute.secure_
context_test) and attribute.on_prototype %} |
| 909 {% filter secure_context(attribute.secure_context_test) %} | 909 {% filter exposed(attribute.exposed_test) %} |
| 910 {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %} | 910 {% filter secure_context(attribute.secure_context_test) %} |
| 911 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attrib
ute_configuration(attribute)}}; | 911 {% filter runtime_enabled(attribute.runtime_enabled_feature_name) %} |
| 912 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), pro
totypeObject, interfaceObject, signature, accessorConfiguration); | 912 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attr
ibute_configuration(attribute)}}; |
| 913 {% endfilter %}{# runtime_enabled #} | 913 V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), p
rototypeObject, interfaceObject, signature, accessorConfiguration); |
| 914 {% endfilter %}{# secure_context #} | 914 {% endfilter %}{# runtime_enabled #} |
| 915 {% endfilter %}{# exposed #} | 915 {% endfilter %}{# secure_context #} |
| 916 {% endfor %} | 916 {% endfilter %}{# exposed #} |
| 917 {% endfor %} |
| 918 } |
| 917 {% endmacro %} | 919 {% endmacro %} |
| 918 | 920 |
| 919 | 921 |
| 920 {##############################################################################} | 922 {##############################################################################} |
| 921 {% block partial_interface %} | 923 {% block partial_interface %} |
| 922 {% if has_partial_interface %} | 924 {% if has_partial_interface %} |
| 923 InstallTemplateFunction {{v8_class}}::install{{v8_class}}TemplateFunction = (Ins
tallTemplateFunction)&{{v8_class}}::install{{v8_class}}Template; | 925 InstallTemplateFunction {{v8_class}}::install{{v8_class}}TemplateFunction = (Ins
tallTemplateFunction)&{{v8_class}}::install{{v8_class}}Template; |
| 924 | 926 |
| 925 void {{v8_class}}::updateWrapperTypeInfo(InstallTemplateFunction installTemplate
Function, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfac
eObjectFunction) { | 927 void {{v8_class}}::updateWrapperTypeInfo(InstallTemplateFunction installTemplate
Function, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfac
eObjectFunction) { |
| 926 {{v8_class}}::install{{v8_class}}TemplateFunction = installTemplateFunction; | 928 {{v8_class}}::install{{v8_class}}TemplateFunction = installTemplateFunction; |
| 927 if (preparePrototypeAndInterfaceObjectFunction) | 929 if (preparePrototypeAndInterfaceObjectFunction) |
| 928 {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = p
reparePrototypeAndInterfaceObjectFunction; | 930 {{v8_class}}::wrapperTypeInfo.preparePrototypeAndInterfaceObjectFunction = p
reparePrototypeAndInterfaceObjectFunction; |
| 929 } | 931 } |
| 930 | 932 |
| 931 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 933 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 932 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 934 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
| 933 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 935 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 934 } | 936 } |
| 935 | 937 |
| 936 {% endfor %} | 938 {% endfor %} |
| 937 {% endif %} | 939 {% endif %} |
| 938 {% endblock %} | 940 {% endblock %} |
| OLD | NEW |