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

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

Issue 227483008: Support FormData on WorkerGlobalScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test expectations Created 6 years, 8 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/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 0458c4b8de25c469dc9d3c581d1c9677e2ebdca4..f27f302adbbcd9f384fe103ce8944d37b26881fa 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -180,7 +180,7 @@ def generate_argument(interface, method, argument, index):
# Value handling
################################################################################
-def cpp_value(interface, method, number_of_arguments):
+def cpp_value(interface, method, number_of_arguments, for_constructor=False):
Nils Barth (inactive) 2014/04/09 02:00:27 I don't think for_constructor is necessary: you ca
sof 2014/04/09 07:31:59 'method' is an IdlOperation/IdlAttribute/.. object
Nils Barth (inactive) 2014/04/09 09:36:38 Got it!
def cpp_argument(argument):
idl_type = argument.idl_type
if idl_type.name == 'EventListener':
@@ -206,14 +206,17 @@ def cpp_value(interface, method, number_of_arguments):
not method.is_static):
cpp_arguments.append('*impl')
cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
- this_union_arguments = method.idl_type.union_arguments
+ this_union_arguments = method.idl_type and method.idl_type.union_arguments
if this_union_arguments:
cpp_arguments.extend(this_union_arguments)
if 'RaisesException' in method.extended_attributes:
cpp_arguments.append('exceptionState')
- cpp_method_name = v8_utilities.scoped_name(interface, method, v8_utilities.cpp_name(method))
+ if for_constructor:
+ cpp_method_name = "%s::create" % v8_utilities.cpp_name(interface)
Nils Barth (inactive) 2014/04/09 02:00:27 I think you can push this into v8_utilities.scoped
sof 2014/04/09 07:31:59 For the same reasons as the above comment, attribu
+ else:
+ cpp_method_name = v8_utilities.scoped_name(interface, method, v8_utilities.cpp_name(method))
return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments))

Powered by Google App Engine
This is Rietveld 408576698