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

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

Issue 99323009: IDL compiler: [Constructor] argument types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Formatting Created 7 years 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_interface.py
diff --git a/Source/bindings/scripts/unstable/v8_interface.py b/Source/bindings/scripts/unstable/v8_interface.py
index 642acb66941b43646d3c24c2fa4cddd400801066..a346ff115851baea134e479cc59bf4227007d6a4 100644
--- a/Source/bindings/scripts/unstable/v8_interface.py
+++ b/Source/bindings/scripts/unstable/v8_interface.py
@@ -114,7 +114,9 @@ def generate_interface(interface):
'conditional_string': conditional_string(interface), # [Conditional]
'constructor_argument_list': constructor_argument_list(interface),
'constructor_arguments': constructor_arguments(interface),
- 'constructor_method': {}, # stub for generating arguments
+ 'constructor_method': {
+ 'is_constructor': True,
+ },
'cpp_class': cpp_name(interface),
'generate_visit_dom_wrapper_function': generate_visit_dom_wrapper_function,
'has_constructor': has_constructor,
@@ -339,12 +341,20 @@ def constructor_arguments(interface):
if not interface.constructors:
return []
constructor = interface.constructors[0] # FIXME: support overloading
- return [{'v8_value_to_local_cpp_value':
- v8_methods.v8_value_to_local_cpp_value(argument, index),
- }
+ return [constructor_argument(argument, index)
for index, argument in enumerate(constructor.arguments)]
+def constructor_argument(argument, index):
+ return {
+ 'idl_type': argument.idl_type,
+ 'index': index,
+ 'name': argument.name,
+ 'v8_value_to_local_cpp_value':
+ v8_methods.v8_value_to_local_cpp_value(argument, index),
+ }
+
+
def interface_length(interface):
# Docs: http://heycam.github.io/webidl/#es-interface-call
if 'EventConstructor' in interface.extended_attributes:
« 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