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_or_partial | 7 '%s::preparePrototypeAndInterfaceObject' % v8_class_or_partial |
8 if has_prepare_prototype_and_interface_object | 8 if has_prepare_prototype_and_interface_object |
9 else 'nullptr' %} | 9 else 'nullptr' %} |
10 | 10 |
11 | 11 |
12 {##############################################################################} | 12 {##############################################################################} |
13 {% block prepare_prototype_and_interface_object %} | 13 {% block prepare_prototype_and_interface_object %} |
14 {% from 'interface.cpp.tmpl' import install_unscopables with context %} | 14 {% from 'interface.cpp.tmpl' import install_unscopables with context %} |
15 {% from 'interface.cpp.tmpl' import install_conditionally_enabled_attributes_on_
prototype with context %} | 15 {% from 'interface.cpp.tmpl' import install_conditionally_enabled_attributes_on_
prototype with context %} |
16 {% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods with con
text %} | 16 {% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods with con
text %} |
17 {% if has_prepare_prototype_and_interface_object %} | 17 {% if has_prepare_prototype_and_interface_object %} |
18 void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C
ontext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeOb
ject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> i
nterfaceTemplate) { | 18 void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C
ontext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeOb
ject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> i
nterfaceTemplate) { |
19 #error No one is currently using a partial interface with context-dependent prop
erties. If you\'re planning to use it, please consult with the binding team: <b
link-reviews-bindings@chromium.org> | |
20 {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObje
ct, interfaceObject, interfaceTemplate); | 19 {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObje
ct, interfaceObject, interfaceTemplate); |
21 v8::Isolate* isolate = context->GetIsolate(); | 20 v8::Isolate* isolate = context->GetIsolate(); |
22 {% if unscopables %} | 21 {% if unscopables %} |
23 {{install_unscopables() | indent(2)}} | 22 {{install_unscopables() | indent(2)}} |
24 {% endif %} | 23 {% endif %} |
25 {% if has_conditional_attributes_on_prototype %} | 24 {% if has_conditional_attributes_on_prototype %} |
26 {{install_conditionally_enabled_attributes_on_prototype() | indent(2)}} | 25 {{install_conditionally_enabled_attributes_on_prototype() | indent(2)}} |
27 {% endif %} | 26 {% endif %} |
28 {% if methods | conditionally_exposed(is_partial) %} | 27 {% if methods | conditionally_exposed(is_partial) %} |
29 {{install_conditionally_enabled_methods() | indent(2)}} | 28 {{install_conditionally_enabled_methods() | indent(2)}} |
(...skipping 12 matching lines...) Expand all Loading... |
42 &{{v8_class_or_partial}}::install{{v8_class}}Template, | 41 &{{v8_class_or_partial}}::install{{v8_class}}Template, |
43 {{prepare_prototype_and_interface_object_func}}); | 42 {{prepare_prototype_and_interface_object_func}}); |
44 {% for method in methods %} | 43 {% for method in methods %} |
45 {% if method.overloads and method.overloads.has_partial_overloads %} | 44 {% if method.overloads and method.overloads.has_partial_overloads %} |
46 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterf
ace(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); | 45 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterf
ace(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); |
47 {% endif %} | 46 {% endif %} |
48 {% endfor %} | 47 {% endfor %} |
49 } | 48 } |
50 | 49 |
51 {% endblock %} | 50 {% endblock %} |
OLD | NEW |