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

Unified Diff: Source/bindings/scripts/v8_utilities.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/v8_methods.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_utilities.py
diff --git a/Source/bindings/scripts/v8_utilities.py b/Source/bindings/scripts/v8_utilities.py
index c1be08a14017422a1a48f274772168785ae355bb..f7ae9c3e15d26d892c33767cf99b6ffc1a11eed8 100644
--- a/Source/bindings/scripts/v8_utilities.py
+++ b/Source/bindings/scripts/v8_utilities.py
@@ -158,10 +158,11 @@ def activity_logging_world_list(member, access_type=''):
# [CallWith]
CALL_WITH_ARGUMENTS = {
'ScriptState': 'scriptState',
- 'ExecutionContext': 'scriptContext',
+ 'ExecutionContext': 'executionContext',
'ScriptArguments': 'scriptArguments.release()',
'ActiveWindow': 'callingDOMWindow(info.GetIsolate())',
'FirstWindow': 'enteredDOMWindow(info.GetIsolate())',
+ 'Document': 'document',
}
# List because key order matters, as we want arguments in deterministic order
CALL_WITH_VALUES = [
@@ -170,12 +171,11 @@ CALL_WITH_VALUES = [
'ScriptArguments',
'ActiveWindow',
'FirstWindow',
+ 'Document',
]
-def call_with_arguments(member, call_with_values=None):
- # Optional parameter so setter can override with [SetterCallWith]
- call_with_values = call_with_values or member.extended_attributes.get('CallWith')
+def call_with_arguments(call_with_values):
if not call_with_values:
return []
return [CALL_WITH_ARGUMENTS[value]
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698