Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 | 699 |
| 700 {% endfor %}{# feature #} | 700 {% endfor %}{# feature #} |
| 701 {% endblock %} | 701 {% endblock %} |
| 702 {##############################################################################} | 702 {##############################################################################} |
| 703 {% block get_dom_template %}{% endblock %} | 703 {% block get_dom_template %}{% endblock %} |
| 704 {% block get_dom_template_for_named_properties_object %}{% endblock %} | 704 {% block get_dom_template_for_named_properties_object %}{% endblock %} |
| 705 {% block has_instance %}{% endblock %} | 705 {% block has_instance %}{% endblock %} |
| 706 {% block to_impl %}{% endblock %} | 706 {% block to_impl %}{% endblock %} |
| 707 {% block to_impl_with_type_check %}{% endblock %} | 707 {% block to_impl_with_type_check %}{% endblock %} |
| 708 {##############################################################################} | 708 {##############################################################################} |
| 709 {% block prepare_prototype_and_interface_object %}{% endblock %} | 709 {% block prepare_prototype_and_interface_object %} |
|
Yuki
2017/02/16 08:38:07
nit: This is just fine as is, but technically you
peria
2017/02/16 08:41:58
Acknowledged.
| |
| 710 {% from 'attributes.cpp.tmpl' import install_conditionally_enabled_attributes_on _prototype with context %} | |
| 711 {% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods with con text %} | |
| 712 {% if has_prepare_prototype_and_interface_object %} | |
| 713 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) { | |
| 714 {% if is_partial %} | |
| 715 {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObje ct, interfaceObject, interfaceTemplate); | |
| 716 {% endif %} | |
| 717 v8::Isolate* isolate = context->GetIsolate(); | |
| 718 | |
| 719 {% if unscopables %} | |
| 720 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); | |
| 721 v8::Local<v8::Object> unscopables; | |
| 722 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol)) ) | |
| 723 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke d().As<v8::Object>(); | |
| 724 else | |
| 725 unscopables = v8::Object::New(isolate); | |
| 726 {% for name, runtime_enabled_feature_name in unscopables %} | |
| 727 {% filter runtime_enabled(runtime_enabled_feature_name) %} | |
| 728 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "{{name}}"), v8::True(isolate)).FromJust(); | |
| 729 {% endfilter %} | |
| 730 {% endfor %} | |
| 731 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F romJust(); | |
| 732 {% endif %}{# unscopables #} | |
| 733 {% if has_conditional_attributes_on_prototype %} | |
| 734 {{install_conditionally_enabled_attributes_on_prototype() | indent(2)}} | |
| 735 {% endif %} | |
| 736 {% if methods | conditionally_exposed(is_partial) %} | |
| 737 {{install_conditionally_enabled_methods() | indent(2)}} | |
| 738 {% endif %} | |
| 739 } | |
| 740 {% endif %} | |
| 741 | |
| 742 {% endblock %} | |
| 710 {##############################################################################} | 743 {##############################################################################} |
| 711 {% block partial_interface %}{% endblock %} | 744 {% block partial_interface %}{% endblock %} |
| 712 } // namespace blink | 745 } // namespace blink |
| 713 | 746 |
| 714 {% endfilter %}{# format_blink_cpp_source_code #} | 747 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |