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

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

Issue 2832923003: v8binding: Don't allow author script to define indexed accessor prop. (Closed)
Patch Set: Added the test expectation. Created 3 years, 5 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 {% block origin_safe_method_setter_callback %}{% endblock %} 237 {% block origin_safe_method_setter_callback %}{% endblock %}
238 {# Special operations (methods) #} 238 {# Special operations (methods) #}
239 {% block named_property_getter_callback %}{% endblock %} 239 {% block named_property_getter_callback %}{% endblock %}
240 {% block named_property_setter_callback %}{% endblock %} 240 {% block named_property_setter_callback %}{% endblock %}
241 {% block named_property_deleter_callback %}{% endblock %} 241 {% block named_property_deleter_callback %}{% endblock %}
242 {% block named_property_query_callback %}{% endblock %} 242 {% block named_property_query_callback %}{% endblock %}
243 {% block named_property_enumerator_callback %}{% endblock %} 243 {% block named_property_enumerator_callback %}{% endblock %}
244 {% block indexed_property_getter_callback %}{% endblock %} 244 {% block indexed_property_getter_callback %}{% endblock %}
245 {% block indexed_property_setter_callback %}{% endblock %} 245 {% block indexed_property_setter_callback %}{% endblock %}
246 {% block indexed_property_deleter_callback %}{% endblock %} 246 {% block indexed_property_deleter_callback %}{% endblock %}
247 {% block indexed_property_definer_callback %}{% endblock %}
247 248
248 {% if has_access_check_callbacks and not is_partial %} 249 {% if has_access_check_callbacks and not is_partial %}
249 bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont ext, v8::Local<v8::Object> accessedObject, v8::Local<v8::Value> data) { 250 bool {{v8_class_or_partial}}::securityCheck(v8::Local<v8::Context> accessingCont ext, v8::Local<v8::Object> accessedObject, v8::Local<v8::Value> data) {
250 {% if interface_name == 'Window' %} 251 {% if interface_name == 'Window' %}
251 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 252 v8::Isolate* isolate = v8::Isolate::GetCurrent();
252 v8::Local<v8::Object> window = V8Window::findInstanceInPrototypeChain(accessed Object, isolate); 253 v8::Local<v8::Object> window = V8Window::findInstanceInPrototypeChain(accessed Object, isolate);
253 if (window.IsEmpty()) 254 if (window.IsEmpty())
254 return false; // the frame is gone. 255 return false; // the frame is gone.
255 256
256 const DOMWindow* targetWindow = V8Window::toImpl(window); 257 const DOMWindow* targetWindow = V8Window::toImpl(window);
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 {% endif %} 947 {% endif %}
947 } 948 }
948 {% endif %} 949 {% endif %}
949 950
950 {% endblock %} 951 {% endblock %}
951 {##############################################################################} 952 {##############################################################################}
952 {% block partial_interface %}{% endblock %} 953 {% block partial_interface %}{% endblock %}
953 } // namespace blink 954 } // namespace blink
954 955
955 {% endfilter %}{# format_blink_cpp_source_code #} 956 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698