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

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

Issue 340443004: IDL: reuse more code between CG for methods and constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename scriptContext -> executionContext Created 6 years, 6 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/idl_definitions.py ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_attributes.py
diff --git a/Source/bindings/scripts/v8_attributes.py b/Source/bindings/scripts/v8_attributes.py
index 46ea36fda60198eb405e250046fb420934db9bf8..4f276c0f9a06c0a1010152120ee4c7e4dbc9566b 100644
--- a/Source/bindings/scripts/v8_attributes.py
+++ b/Source/bindings/scripts/v8_attributes.py
@@ -212,7 +212,8 @@ def getter_expression(interface, attribute, contents):
this_getter_base_name = getter_base_name(interface, attribute, arguments)
getter_name = scoped_name(interface, attribute, this_getter_base_name)
- arguments.extend(v8_utilities.call_with_arguments(attribute))
+ arguments.extend(v8_utilities.call_with_arguments(
+ attribute.extended_attributes.get('CallWith')))
# Members of IDL partial interface definitions are implemented in C++ as
# static member functions, which for instance members (non-static members)
# take *impl as their first argument
@@ -307,7 +308,9 @@ def generate_setter(interface, attribute, contents):
def setter_expression(interface, attribute, contents):
extended_attributes = attribute.extended_attributes
- arguments = v8_utilities.call_with_arguments(attribute, extended_attributes.get('SetterCallWith'))
+ arguments = v8_utilities.call_with_arguments(
+ extended_attributes.get('SetterCallWith') or
+ extended_attributes.get('CallWith'))
this_setter_base_name = setter_base_name(interface, attribute, arguments)
setter_name = scoped_name(interface, attribute, this_setter_base_name)
« no previous file with comments | « Source/bindings/scripts/idl_definitions.py ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698