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

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

Issue 2429343004: [CachedAccessor] for window.document. (Closed)
Patch Set: Review feedback (and rebase) Created 4 years, 2 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 {% 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 {% else %} 697 {% else %}
698 {% set getter_callback_for_main_world = '0' %} 698 {% set getter_callback_for_main_world = '0' %}
699 {% set setter_callback_for_main_world = '0' %} 699 {% set setter_callback_for_main_world = '0' %}
700 {% endif %} 700 {% endif %}
701 {% set property_attribute = 701 {% set property_attribute =
702 'static_cast<v8::PropertyAttribute>(%s)' % 702 'static_cast<v8::PropertyAttribute>(%s)' %
703 ' | '.join(method.property_attributes or ['v8::None']) %} 703 ' | '.join(method.property_attributes or ['v8::None']) %}
704 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %} 704 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %}
705 {% set holder_check = 'V8DOMConfiguration::CheckHolder' %} 705 {% set holder_check = 'V8DOMConfiguration::CheckHolder' %}
706 const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttrib uteConfiguration = { 706 const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttrib uteConfiguration = {
707 "{{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}}, 707 "{{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}},
708 }; 708 };
709 V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{pr ototype_template}}, {{method.name}}OriginSafeAttributeConfiguration); 709 V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{pr ototype_template}}, {{method.name}}OriginSafeAttributeConfiguration);
710 {%- endmacro %} 710 {%- endmacro %}
711 711
712 712
713 {##############################################################################} 713 {##############################################################################}
714 {% macro install_indexed_property_handler(target) %} 714 {% macro install_indexed_property_handler(target) %}
715 {% set indexed_property_getter_callback = 715 {% set indexed_property_getter_callback =
716 '%sV8Internal::indexedPropertyGetterCallback' % cpp_class %} 716 '%sV8Internal::indexedPropertyGetterCallback' % cpp_class %}
717 {% set indexed_property_setter_callback = 717 {% set indexed_property_setter_callback =
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 992
993 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 993 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
994 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 994 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
995 { 995 {
996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 996 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
997 } 997 }
998 998
999 {% endfor %} 999 {% endfor %}
1000 {% endif %} 1000 {% endif %}
1001 {% endblock %} 1001 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698