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

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

Issue 142923002: IDL compiler: implements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove re changes 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 | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/tests/idls/TestImplements.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 442d58dd6c0d8d4dc0fd9f4ccda0f25929c6d901..76f37f02a9c4d7bbc817759975a2c64775b563cb 100644
--- a/Source/bindings/scripts/unstable/v8_methods.py
+++ b/Source/bindings/scripts/unstable/v8_methods.py
@@ -166,10 +166,10 @@ def cpp_value(interface, method, number_of_arguments):
# Truncate omitted optional arguments
arguments = method.arguments[:number_of_arguments]
cpp_arguments = v8_utilities.call_with_arguments(method)
- cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
if ('ImplementedBy' in method.extended_attributes and
not method.is_static):
cpp_arguments.append('imp')
+ cpp_arguments.extend(cpp_argument(argument) for argument in arguments)
if 'RaisesException' in method.extended_attributes:
cpp_arguments.append('exceptionState')
@@ -185,7 +185,11 @@ def v8_set_return_value(interface_name, method, cpp_value):
# [CallWith=ScriptState], [RaisesException]
if (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or
'RaisesException' in extended_attributes):
- cpp_value = 'result' # use local variable for value
+ # use local variable for value
+ if v8_types.is_interface_type(idl_type):
+ cpp_value = 'result.release()'
+ else:
+ cpp_value = 'result'
script_wrappable = 'imp' if v8_types.inherits_interface(interface_name, 'Node') else ''
return v8_types.v8_set_return_value(idl_type, cpp_value, extended_attributes, script_wrappable=script_wrappable)
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/tests/idls/TestImplements.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698