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

Unified Diff: Source/bindings/scripts/unstable/v8_attributes.py

Issue 26645002: IDL compiler: [DoNotCheckSecurity], [DoNotCheckSecurityOnGetter], [DoNotCheckSecurityOnSetter] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert Perl Created 7 years, 2 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 | « no previous file | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_attributes.py
diff --git a/Source/bindings/scripts/unstable/v8_attributes.py b/Source/bindings/scripts/unstable/v8_attributes.py
index 029d5d20e68d6e74c29dd0a4c925d6c5067c7cb7..837af38e72aeab2e4a46c137861523f147ce130a 100644
--- a/Source/bindings/scripts/unstable/v8_attributes.py
+++ b/Source/bindings/scripts/unstable/v8_attributes.py
@@ -67,6 +67,7 @@ def generate_attribute_and_includes(interface, attribute):
extended_attributes = attribute.extended_attributes
this_is_keep_alive_for_gc = is_keep_alive_for_gc(attribute)
contents = {
+ 'access_control_list': access_control_list(attribute),
'cached_attribute_validation_method': extended_attributes.get('CachedAttribute'),
'conditional_string': v8_utilities.generate_conditional_string(attribute),
'cpp_type': v8_types.cpp_type(idl_type),
@@ -164,3 +165,18 @@ def is_keep_alive_for_gc(attribute):
# FIXME: Remove these hard-coded hacks.
idl_type in ['EventHandler', 'Promise', 'Window'] or
idl_type.startswith('HTML'))))
+
+
+# [DoNotCheckSecurity], [DoNotCheckSecurityOnGetter], [DoNotCheckSecurityOnSetter]
+def access_control_list(attribute):
+ extended_attributes = attribute.extended_attributes
+ if 'DoNotCheckSecurity' in extended_attributes:
+ access_control = ['v8::ALL_CAN_READ']
+ if not attribute.is_read_only:
+ access_control.append('v8::ALL_CAN_WRITE')
+ return access_control
+ if 'DoNotCheckSecurityOnSetter' in extended_attributes:
+ return ['v8::ALL_CAN_WRITE']
+ if 'DoNotCheckSecurityOnGetter' in extended_attributes:
+ return ['v8::ALL_CAN_READ']
+ return ['v8::DEFAULT']
« no previous file with comments | « no previous file | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698