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

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

Issue 2429343004: [CachedAccessor] for window.document. (Closed)
Patch Set: Fix expectation for global-interface-listing-expected, windows. Created 4 years, 1 month 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 {% 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 7 '%s::preparePrototypeAndInterfaceObject' % v8_class
8 if has_prepare_prototype_and_interface_object 8 if has_prepare_prototype_and_interface_object
9 else 'nullptr' %} 9 else 'nullptr' %}
10 10
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 {% else %} 675 {% else %}
676 {% set getter_callback_for_main_world = '0' %} 676 {% set getter_callback_for_main_world = '0' %}
677 {% set setter_callback_for_main_world = '0' %} 677 {% set setter_callback_for_main_world = '0' %}
678 {% endif %} 678 {% endif %}
679 {% set property_attribute = 679 {% set property_attribute =
680 'static_cast<v8::PropertyAttribute>(%s)' % 680 'static_cast<v8::PropertyAttribute>(%s)' %
681 ' | '.join(method.property_attributes or ['v8::None']) %} 681 ' | '.join(method.property_attributes or ['v8::None']) %}
682 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %} 682 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %}
683 {% set holder_check = 'V8DOMConfiguration::CheckHolder' %} 683 {% set holder_check = 'V8DOMConfiguration::CheckHolder' %}
684 const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttrib uteConfiguration = { 684 const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttrib uteConfiguration = {
685 "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callba ck_for_main_world}}, {{setter_callback_for_main_world}}, &{{v8_class}}::wrapperT ypeInfo, v8::ALL_CAN_READ, {{property_attribute}}, {{only_exposed_to_private_scr ipt}}, {{property_location(method)}}, {{holder_check}}, 685 "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callba ck_for_main_world}}, {{setter_callback_for_main_world}}, nullptr, &{{v8_class}}: :wrapperTypeInfo, v8::ALL_CAN_READ, {{property_attribute}}, {{only_exposed_to_pr ivate_script}}, {{property_location(method)}}, {{holder_check}},
686 }; 686 };
687 V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{pr ototype_template}}, {{method.name}}OriginSafeAttributeConfiguration); 687 V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{pr ototype_template}}, {{method.name}}OriginSafeAttributeConfiguration);
688 {%- endmacro %} 688 {%- endmacro %}
689 689
690 690
691 {##############################################################################} 691 {##############################################################################}
692 {% macro install_indexed_property_handler(target) %} 692 {% macro install_indexed_property_handler(target) %}
693 {% set indexed_property_getter_callback = 693 {% set indexed_property_getter_callback =
694 '%sV8Internal::indexedPropertyGetterCallback' % cpp_class %} 694 '%sV8Internal::indexedPropertyGetterCallback' % cpp_class %}
695 {% set indexed_property_setter_callback = 695 {% set indexed_property_setter_callback =
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 } 959 }
960 960
961 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 961 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
962 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { 962 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
963 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 963 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
964 } 964 }
965 965
966 {% endfor %} 966 {% endfor %}
967 {% endif %} 967 {% endif %}
968 {% endblock %} 968 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698