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

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

Issue 137593005: IDL compiler: [RaisesException] for non-void methods (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/templates/methods.cpp » ('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 a74a3cdc131d7411a2f0f6f268d9ab412daaa66c..ce9136fc72ef3a018e9ba1982c8ac301a59dd35d 100644
--- a/Source/bindings/scripts/unstable/v8_methods.py
+++ b/Source/bindings/scripts/unstable/v8_methods.py
@@ -176,13 +176,15 @@ def cpp_value(interface, method, number_of_arguments):
def v8_set_return_value(interface_name, method, cpp_value):
idl_type = method.idl_type
+ extended_attributes = method.extended_attributes
if idl_type == 'void':
return None
- # [CallWith=ScriptState]
- if has_extended_attribute_value(method, 'CallWith', 'ScriptState'):
+ # [CallWith=ScriptState], [RaisesException]
+ if (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or
+ 'RaisesException' in extended_attributes):
cpp_value = 'result' # use local variable for value
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)
+ return v8_types.v8_set_return_value(idl_type, cpp_value, extended_attributes, script_wrappable=script_wrappable)
# [NotEnumerable]
« no previous file with comments | « no previous file | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698