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

Unified Diff: Source/bindings/templates/interface_base.cpp

Issue 921683002: make window interceptors DoNoCheckSecurity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/core/TestInterface.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface_base.cpp
diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp
index a23650bd35c50028e6db74a72c24bf1b5c360723..3c68df868fc6d74289ca10feaaf65a7a2f779601 100644
--- a/Source/bindings/templates/interface_base.cpp
+++ b/Source/bindings/templates/interface_base.cpp
@@ -358,7 +358,13 @@ static void install{{v8_class}}Template(v8::Local<v8::FunctionTemplate> function
{% set indexed_property_enumerator_callback =
'indexedPropertyEnumerator<%s>' % cpp_class
if indexed_property_getter.is_enumerable else '0' %}
- functionTemplate->{{set_on_template}}()->SetHandler(v8::IndexedPropertyHandlerConfiguration({{indexed_property_getter_callback}}, {{indexed_property_setter_callback}}, {{indexed_property_query_callback}}, {{indexed_property_deleter_callback}}, {{indexed_property_enumerator_callback}}));
+ {
+ v8::IndexedPropertyHandlerConfiguration config({{indexed_property_getter_callback}}, {{indexed_property_setter_callback}}, {{indexed_property_query_callback}}, {{indexed_property_deleter_callback}}, {{indexed_property_enumerator_callback}});
+ {% if indexed_property_getter.do_not_check_security %}
+ config.flags = v8::PropertyHandlerFlags::kAllCanRead;
+ {% endif %}
+ functionTemplate->{{set_on_template}}()->SetHandler(config);
+ }
{% endif %}
{% if named_property_getter %}
{# if have named properties, MUST have a named property getter #}
@@ -376,7 +382,13 @@ static void install{{v8_class}}Template(v8::Local<v8::FunctionTemplate> function
{% set named_property_enumerator_callback =
'%sV8Internal::namedPropertyEnumeratorCallback' % cpp_class
if named_property_getter.is_enumerable else '0' %}
- functionTemplate->{{set_on_template}}()->SetHandler(v8::NamedPropertyHandlerConfiguration({{named_property_getter_callback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}}));
+ {
+ v8::NamedPropertyHandlerConfiguration config({{named_property_getter_callback}}, {{named_property_setter_callback}}, {{named_property_query_callback}}, {{named_property_deleter_callback}}, {{named_property_enumerator_callback}});
+ {% if named_property_getter.do_not_check_security %}
+ config.flags = v8::PropertyHandlerFlags::kAllCanRead;
+ {% endif %}
+ functionTemplate->{{set_on_template}}()->SetHandler(config);
+ }
{% endif %}
{% if iterator_method %}
{% filter per_context_enabled(iterator_method.per_context_enabled_function) %}
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/tests/idls/core/TestInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698