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

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

Issue 2713413002: Blink bindings: use v8 to enforce method call access checks (Closed)
Patch Set: . Created 3 years, 9 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "forEach") , v8::kArrayProto_forEach); 524 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "forEach") , v8::kArrayProto_forEach);
525 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "keys"), v 8::kArrayProto_keys); 525 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "keys"), v 8::kArrayProto_keys);
526 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "values"), v8::kArrayProto_values); 526 prototypeTemplate->SetIntrinsicDataProperty(v8AtomicString(isolate, "values"), v8::kArrayProto_values);
527 {% endif %} 527 {% endif %}
528 {% endif %} 528 {% endif %}
529 529
530 {% if iterator_method %} 530 {% if iterator_method %}
531 {% filter exposed(iterator_method.exposed_test) %} 531 {% filter exposed(iterator_method.exposed_test) %}
532 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %} 532 {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %}
533 // Iterator (@@iterator) 533 // Iterator (@@iterator)
534 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; 534 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorCo nfiguration = { v8::Symbol::GetIterator, {{v8_class_or_partial}}::iteratorMethod Callback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype, V8DOMConfiguration:: CheckHolder, V8DOMConfiguration::DoNotCheckAccess };
535 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration); 535 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature , symbolKeyedIteratorConfiguration);
536 {% endfilter %} 536 {% endfilter %}
537 {% endfilter %} 537 {% endfilter %}
538 {% endif %} 538 {% endif %}
539 539
540 {% if interface_name == 'Location' %} 540 {% if interface_name == 'Location' %}
541 // Symbol.toPrimitive 541 // Symbol.toPrimitive
542 // Prevent author scripts to inject Symbol.toPrimitive property into location 542 // Prevent author scripts to inject Symbol.toPrimitive property into location
543 // objects, also prevent the look-up of Symbol.toPrimitive through the 543 // objects, also prevent the look-up of Symbol.toPrimitive through the
544 // prototype chain. 544 // prototype chain.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 {% endif %} 744 {% endif %}
745 } 745 }
746 {% endif %} 746 {% endif %}
747 747
748 {% endblock %} 748 {% endblock %}
749 {##############################################################################} 749 {##############################################################################}
750 {% block partial_interface %}{% endblock %} 750 {% block partial_interface %}{% endblock %}
751 } // namespace blink 751 } // namespace blink
752 752
753 {% endfilter %}{# format_blink_cpp_source_code #} 753 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698