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_methods.py

Issue 133583002: IDL compiler: methods in Node interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 11 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 | « no previous file | Source/bindings/tests/idls/TestInterfaceNode.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_methods.py
diff --git a/Source/bindings/scripts/unstable/v8_methods.py b/Source/bindings/scripts/unstable/v8_methods.py
index 8ee371005790f20b7e78a6225e66160056349b8e..a74a3cdc131d7411a2f0f6f268d9ab412daaa66c 100644
--- a/Source/bindings/scripts/unstable/v8_methods.py
+++ b/Source/bindings/scripts/unstable/v8_methods.py
@@ -124,7 +124,7 @@ def generate_method(interface, method):
'property_attributes': property_attributes(method),
'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(method), # [RuntimeEnabled]
'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSignature' in extended_attributes else 'defaultSignature',
- 'v8_set_return_value': v8_set_return_value(method, this_cpp_value),
+ 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended_attributes else [''], # [PerWorldBindings]
}
return contents
@@ -149,7 +149,7 @@ def generate_argument(interface, method, argument, index):
'is_variadic_wrapper_type': argument.is_variadic and v8_types.is_wrapper_type(idl_type),
'is_wrapper_type': v8_types.is_wrapper_type(idl_type),
'name': argument.name,
- 'v8_set_return_value': v8_set_return_value(method, this_cpp_value),
+ 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index),
}
@@ -174,14 +174,15 @@ def cpp_value(interface, method, number_of_arguments):
return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments))
-def v8_set_return_value(method, cpp_value):
+def v8_set_return_value(interface_name, method, cpp_value):
idl_type = method.idl_type
if idl_type == 'void':
return None
# [CallWith=ScriptState]
if has_extended_attribute_value(method, 'CallWith', 'ScriptState'):
cpp_value = 'result' # use local variable for value
- return v8_types.v8_set_return_value(idl_type, cpp_value, method.extended_attributes)
+ script_wrappable = 'imp' if v8_types.inherits_interface(interface_name, 'Node') else ''
+ return v8_types.v8_set_return_value(idl_type, cpp_value, method.extended_attributes, script_wrappable=script_wrappable)
# [NotEnumerable]
« no previous file with comments | « no previous file | Source/bindings/tests/idls/TestInterfaceNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698