| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% block prepare_prototype_object %} | 5 {% block prepare_prototype_and_interface_object %} |
| 6 {% from 'interface.cpp' import install_unscopeables with context %} | 6 {% from 'interface.cpp' import install_unscopeables with context %} |
| 7 {% from 'interface.cpp' import install_conditionally_enabled_attributes_on_proto
type with context %} | 7 {% from 'interface.cpp' import install_conditionally_enabled_attributes_on_proto
type with context %} |
| 8 {% from 'methods.cpp' import install_conditionally_enabled_methods | 8 {% from 'methods.cpp' import install_conditionally_enabled_methods |
| 9 with context %} | 9 with context %} |
| 10 void {{v8_class_or_partial}}::preparePrototypeObject(v8::Isolate* isolate, v8::L
ocal<v8::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) | 10 void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Isolate* is
olate, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceO
bject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
| 11 { | 11 { |
| 12 {{v8_class}}::preparePrototypeObject(isolate, prototypeObject, interfaceTemp
late); | 12 {{v8_class}}::preparePrototypeAndInterfaceObject(isolate, prototypeObject, i
nterfaceObject, interfaceTemplate); |
| 13 {% if unscopeables %} | 13 {% if unscopeables %} |
| 14 {{install_unscopeables() | indent}} | 14 {{install_unscopeables() | indent}} |
| 15 {% endif %} | 15 {% endif %} |
| 16 {% if has_conditional_attributes_on_prototype %} | 16 {% if has_conditional_attributes_on_prototype %} |
| 17 {{install_conditionally_enabled_attributes_on_prototype() | indent}} | 17 {{install_conditionally_enabled_attributes_on_prototype() | indent}} |
| 18 {% endif %} | 18 {% endif %} |
| 19 {% if conditionally_enabled_methods %} | 19 {% if conditionally_enabled_methods %} |
| 20 {{install_conditionally_enabled_methods() | indent}} | 20 {{install_conditionally_enabled_methods() | indent}} |
| 21 {% endif %} | 21 {% endif %} |
| 22 } | 22 } |
| 23 | 23 |
| 24 {% endblock %} | 24 {% endblock %} |
| 25 | 25 |
| 26 | 26 |
| 27 {##############################################################################} | 27 {##############################################################################} |
| 28 {% block partial_interface %} | 28 {% block partial_interface %} |
| 29 void {{v8_class_or_partial}}::initialize() | 29 void {{v8_class_or_partial}}::initialize() |
| 30 { | 30 { |
| 31 // Should be invoked from initModules. | 31 // Should be invoked from initModules. |
| 32 {{v8_class}}::updateWrapperTypeInfo( | 32 {{v8_class}}::updateWrapperTypeInfo( |
| 33 &{{v8_class_or_partial}}::install{{v8_class}}Template, | 33 &{{v8_class_or_partial}}::install{{v8_class}}Template, |
| 34 &{{v8_class_or_partial}}::preparePrototypeObject); | 34 &{{v8_class_or_partial}}::preparePrototypeAndInterfaceObject); |
| 35 {% for method in methods %} | 35 {% for method in methods %} |
| 36 {% if method.overloads and method.overloads.has_partial_overloads %} | 36 {% if method.overloads and method.overloads.has_partial_overloads %} |
| 37 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInte
rface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); | 37 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInte
rface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); |
| 38 {% endif %} | 38 {% endif %} |
| 39 {% endfor %} | 39 {% endfor %} |
| 40 } | 40 } |
| 41 | 41 |
| 42 {% endblock %} | 42 {% endblock %} |
| OLD | NEW |