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

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

Issue 31933002: IDL compiler: [SetterCallWith] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised 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
Index: Source/bindings/scripts/unstable/v8_utilities.py
diff --git a/Source/bindings/scripts/unstable/v8_utilities.py b/Source/bindings/scripts/unstable/v8_utilities.py
index b0bbb1f378c8e1d3a1f015c0dc9ee3363d4480e1..c501726dcc531092336ee66d4e340ae1d83f45ca 100644
--- a/Source/bindings/scripts/unstable/v8_utilities.py
+++ b/Source/bindings/scripts/unstable/v8_utilities.py
@@ -47,9 +47,9 @@ def has_extended_attribute(definition_or_member, extended_attribute_list):
return any(extended_attribute in definition_or_member.extended_attributes
for extended_attribute in extended_attribute_list)
-def has_extended_attribute_value(extended_attributes, key, value):
- return (key in extended_attributes and
- value in re.split('[|&]', extended_attributes[key]))
+
+def extended_attribute_value_contains(extended_attribute_value, value):
+ return value in re.split('[|&]', extended_attribute_value)
def capitalize(name):
@@ -118,17 +118,16 @@ CALL_WITH_VALUES = [
]
-def call_with_arguments(member, contents):
- extended_attributes = member.extended_attributes
- if 'CallWith' not in extended_attributes:
+def call_with_arguments(call_with_values, contents):
+ if not call_with_values:
return []
- # FIXME: Implement other template values for setters and functions
- contents['is_call_with_script_execution_context'] = has_extended_attribute_value(extended_attributes, 'CallWith', 'ExecutionContext')
+ # FIXME: Implement other template values for functions
+ contents['is_call_with_script_execution_context'] = extended_attribute_value_contains(call_with_values, 'ExecutionContext')
return [CALL_WITH_ARGUMENTS[value]
for value in CALL_WITH_VALUES
- if has_extended_attribute_value(extended_attributes, 'CallWith', value)]
+ if extended_attribute_value_contains(call_with_values, value)]
# [Conditional]
« no previous file with comments | « Source/bindings/scripts/unstable/v8_callback_interface.py ('k') | Source/bindings/tests/idls/TestObjectPython.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698