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

Side by Side Diff: Source/bindings/templates/interface_base.cpp

Issue 1019773006: use non-masking, string interceptors in generated bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix test Created 5 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 {% filter conditional(conditional_string) %} 8 {% filter conditional(conditional_string) %}
9 #include "{{v8_class_or_partial}}.h" 9 #include "{{v8_class_or_partial}}.h"
10 10
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 '%sV8Internal::namedPropertyQueryCallback' % cpp_class 391 '%sV8Internal::namedPropertyQueryCallback' % cpp_class
392 if named_property_getter.is_enumerable else '0' %} 392 if named_property_getter.is_enumerable else '0' %}
393 {% set named_property_deleter_callback = 393 {% set named_property_deleter_callback =
394 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class 394 '%sV8Internal::namedPropertyDeleterCallback' % cpp_class
395 if named_property_deleter else '0' %} 395 if named_property_deleter else '0' %}
396 {% set named_property_enumerator_callback = 396 {% set named_property_enumerator_callback =
397 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class 397 '%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class
398 if named_property_getter.is_enumerable else '0' %} 398 if named_property_getter.is_enumerable else '0' %}
399 { 399 {
400 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}}); 400 v8::NamedPropertyHandlerConfiguration config({{named_property_getter_cal lback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}});
401 {% if not named_property_getter.is_custom %}
402 config.flags = static_cast<v8::PropertyHandlerFlags>(static_cast<int>(co nfig.flags) | static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStrings)) ;
403 {% endif %}
401 {% if named_property_getter.do_not_check_security %} 404 {% if named_property_getter.do_not_check_security %}
402 config.flags = v8::PropertyHandlerFlags::kAllCanRead; 405 config.flags = v8::PropertyHandlerFlags::kAllCanRead;
403 {% endif %} 406 {% endif %}
407 {% if not is_override_builtins and not named_property_getter.is_custom % }
408 config.flags = static_cast<v8::PropertyHandlerFlags>(static_cast<int>(co nfig.flags) | static_cast<int>(v8::PropertyHandlerFlags::kNonMasking));
409 {% endif %}
404 functionTemplate->{{set_on_template}}()->SetHandler(config); 410 functionTemplate->{{set_on_template}}()->SetHandler(config);
405 } 411 }
406 {% endif %} 412 {% endif %}
407 {% if iterator_method %} 413 {% if iterator_method %}
408 {% filter per_context_enabled(iterator_method.per_context_enabled_function) %} 414 {% filter per_context_enabled(iterator_method.per_context_enabled_function) %}
409 {% filter exposed(iterator_method.exposed_test) %} 415 {% filter exposed(iterator_method.exposed_test) %}
410 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} 416 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %}
411 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 417 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Inte rnal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
412 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration); 418 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, v8::DontDelete, symbolKeyedIteratorConfiguration);
413 {% endfilter %}{# runtime_enabled() #} 419 {% endfilter %}{# runtime_enabled() #}
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 {% endfor %} 504 {% endfor %}
499 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 505 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
500 {{attribute_getter_implemented_in_private_script(attribute)}} 506 {{attribute_getter_implemented_in_private_script(attribute)}}
501 {% if attribute.has_setter %} 507 {% if attribute.has_setter %}
502 {{attribute_setter_implemented_in_private_script(attribute)}} 508 {{attribute_setter_implemented_in_private_script(attribute)}}
503 {% endif %} 509 {% endif %}
504 {% endfor %} 510 {% endfor %}
505 {% block partial_interface %}{% endblock %} 511 {% block partial_interface %}{% endblock %}
506 } // namespace blink 512 } // namespace blink
507 {% endfilter %} 513 {% endfilter %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/tests/results/core/V8TestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698