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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_attributes.py

Issue 2506393004: binding: Makes non-cross-origin-accessible attrs be accessor props. (Closed)
Patch Set: Synced. Created 4 years, 1 month 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
Index: third_party/WebKit/Source/bindings/scripts/v8_attributes.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
index 8881a9202795dfd28936343484b09170f948909d..3375d44fd7fc6c9fa3d655248f05d97b2266e303 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -71,7 +71,7 @@ def attribute_context(interface, attribute, interfaces):
is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes
is_check_security_for_receiver = (
has_extended_attribute_value(interface, 'CheckSecurity', 'Receiver') and
- not is_do_not_check_security)
+ is_do_not_check_security)
is_check_security_for_return_value = (
has_extended_attribute_value(attribute, 'CheckSecurity', 'ReturnValue'))
if is_check_security_for_receiver or is_check_security_for_return_value:
@@ -150,7 +150,7 @@ def attribute_context(interface, attribute, interfaces):
'is_check_security_for_return_value': is_check_security_for_return_value,
'is_custom_element_callbacks': is_custom_element_callbacks,
# TODO(yukishiino): Make all DOM attributes accessor-type properties.
- 'is_data_type_property': not ('CachedAccessor' in extended_attributes) and is_data_type_property(interface, attribute),
+ 'is_data_type_property': is_data_type_property(interface, attribute),
'is_getter_raises_exception': # [RaisesException]
'RaisesException' in extended_attributes and
extended_attributes['RaisesException'] in (None, 'Getter'),
@@ -537,9 +537,10 @@ def is_writable(attribute):
def is_data_type_property(interface, attribute):
+ if 'CachedAccessor' in attribute.extended_attributes:
+ return False
return (is_constructor_attribute(attribute) or
- interface.name == 'Window' or
- interface.name == 'Location')
+ 'DoNotCheckSecurity' in attribute.extended_attributes)
# [PutForwards], [Replaceable]

Powered by Google App Engine
This is Rietveld 408576698