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

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

Issue 891633003: make window interceptors AllCanRead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test from issue 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/TestInterface2.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..625a09af17fa783a2081a8d77c576add7e637860 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.all_can_read %}
+ 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.all_can_read %}
+ 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/TestInterface2.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698