Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Work for all comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 635
636 {% endif %}{# not is_array_buffer_or_view #} 636 {% endif %}{# not is_array_buffer_or_view #}
637 {% endblock %} 637 {% endblock %}
638 {##############################################################################} 638 {##############################################################################}
639 {% block install_runtime_enabled %} 639 {% block install_runtime_enabled %}
640 {% if needs_runtime_enabled_installer %} 640 {% if needs_runtime_enabled_installer %}
641 {% from 'attributes.cpp.tmpl' import accessor_configuration, 641 {% from 'attributes.cpp.tmpl' import accessor_configuration,
642 attribute_configuration, 642 attribute_configuration,
643 with context %} 643 with context %}
644 {% from 'methods.cpp.tmpl' import install_custom_signature with context %} 644 {% from 'methods.cpp.tmpl' import install_custom_signature with context %}
645 void {{v8_class_or_partial}}::installRuntimeEnabledFeatures(v8::Isolate* isolate , const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Ob ject> prototype, v8::Local<v8::Function> interface) { 645 void {{v8_class_or_partial}}::InstallRuntimeEnabledFeatures(
646 v8::Isolate* isolate,
647 const DOMWrapperWorld& world,
648 v8::Local<v8::Object> instance,
649 v8::Local<v8::Object> prototype,
650 v8::Local<v8::Function> interface) {
646 {% if runtime_enabled_feature_name %} 651 {% if runtime_enabled_feature_name %}
647 #error "We don't expect a runtime enabled interface {{v8_class_or_partial}} to h ave installRuntimeEnabledFeatures()." 652 #error "We don't expect a runtime enabled interface {{v8_class_or_partial}} to h ave installRuntimeEnabledFeatures()."
648 {% endif %} 653 {% endif %}
649 654
650 {% if is_partial %} 655 {% if is_partial %}
651 {{v8_class}}::installRuntimeEnabledFeatures(isolate, world, instance, prototyp e, interface); 656 {{v8_class}}::InstallRuntimeEnabledFeatures(isolate, world, instance, prototyp e, interface);
652 {% endif %} 657 {% endif %}
653 658
654 v8::Local<v8::FunctionTemplate> interfaceTemplate = {{v8_class}}::wrapperTypeI nfo.domTemplate(isolate, world); 659 v8::Local<v8::FunctionTemplate> interface_template = {{v8_class}}::wrapperType Info.domTemplate(isolate, world);
655 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 660 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_tem plate);
656 ALLOW_UNUSED_LOCAL(signature); 661 ALLOW_UNUSED_LOCAL(signature);
657 662
658 {# TODO(peria): Generate code to install constants. It depends on runtime_enab led_feaure of this interface. #} 663 {# TODO(peria): Generate code to install constants. It depends on runtime_enab led_feaure of this interface. #}
659 664
660 {% for feature_name, attrs in runtime_enabled_attributes | selectattr('is_data _type_property') | groupby('runtime_enabled_feature_name') %} 665 {% for feature_name, attrs in runtime_enabled_attributes | selectattr('is_data _type_property') | groupby('runtime_enabled_feature_name') %}
661 {% filter runtime_enabled(feature_name) %} 666 {% filter runtime_enabled(feature_name) %}
662 static const V8DOMConfiguration::AttributeConfiguration attribute_configuratio ns[] = { 667 static const V8DOMConfiguration::AttributeConfiguration attribute_configuratio ns[] = {
663 {% for attribute in attrs | sort %} 668 {% for attribute in attrs | sort %}
664 {{attribute_configuration(attribute) | indent(6)}}, 669 {{attribute_configuration(attribute) | indent(6)}},
665 {% endfor %} 670 {% endfor %}
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 {% endif %} 835 {% endif %}
831 } 836 }
832 {% endif %} 837 {% endif %}
833 838
834 {% endblock %} 839 {% endblock %}
835 {##############################################################################} 840 {##############################################################################}
836 {% block partial_interface %}{% endblock %} 841 {% block partial_interface %}{% endblock %}
837 } // namespace blink 842 } // namespace blink
838 843
839 {% endfilter %}{# format_blink_cpp_source_code #} 844 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698