| 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_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 'methods.cpp' import install_conditionally_enabled_methods | 8 {% from 'methods.cpp' import install_conditionally_enabled_methods |
| 8 with context %} | 9 with context %} |
| 9 void {{v8_class_or_partial}}::preparePrototypeObject(v8::Isolate* isolate, v8::L
ocal<v8::Object> prototypeObject) | 10 void {{v8_class_or_partial}}::preparePrototypeObject(v8::Isolate* isolate, v8::L
ocal<v8::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) |
| 10 { | 11 { |
| 11 {{v8_class}}::preparePrototypeObject(isolate, prototypeObject); | 12 {{v8_class}}::preparePrototypeObject(isolate, prototypeObject, interfaceTemp
late); |
| 12 {% if unscopeables %} | 13 {% if unscopeables %} |
| 13 {{install_unscopeables() | indent}} | 14 {{install_unscopeables() | indent}} |
| 14 {% endif %} | 15 {% endif %} |
| 16 {% if has_conditional_attributes_on_prototype %} |
| 17 {{install_conditionally_enabled_attributes_on_prototype() | indent}} |
| 18 {% endif %} |
| 15 {% if conditionally_enabled_methods %} | 19 {% if conditionally_enabled_methods %} |
| 16 {{install_conditionally_enabled_methods() | indent}} | 20 {{install_conditionally_enabled_methods() | indent}} |
| 17 {% endif %} | 21 {% endif %} |
| 18 } | 22 } |
| 19 | 23 |
| 20 {% endblock %} | 24 {% endblock %} |
| 21 | 25 |
| 22 | 26 |
| 23 {##############################################################################} | 27 {##############################################################################} |
| 24 {% block partial_interface %} | 28 {% block partial_interface %} |
| 25 void {{v8_class_or_partial}}::initialize() | 29 void {{v8_class_or_partial}}::initialize() |
| 26 { | 30 { |
| 27 // Should be invoked from initModules. | 31 // Should be invoked from initModules. |
| 28 {{v8_class}}::updateWrapperTypeInfo( | 32 {{v8_class}}::updateWrapperTypeInfo( |
| 29 &{{v8_class_or_partial}}::install{{v8_class}}Template, | 33 &{{v8_class_or_partial}}::install{{v8_class}}Template, |
| 30 &{{v8_class_or_partial}}::preparePrototypeObject); | 34 &{{v8_class_or_partial}}::preparePrototypeObject); |
| 31 {% for method in methods %} | 35 {% for method in methods %} |
| 32 {% if method.overloads and method.overloads.has_partial_overloads %} | 36 {% if method.overloads and method.overloads.has_partial_overloads %} |
| 33 {{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); |
| 34 {% endif %} | 38 {% endif %} |
| 35 {% endfor %} | 39 {% endfor %} |
| 36 } | 40 } |
| 37 | 41 |
| 38 {% endblock %} | 42 {% endblock %} |
| OLD | NEW |