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

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

Issue 265293004: Create fewer local v8::TryCatch objects in generated bindings code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: call block.ReThrow() when throwing exceptions Created 6 years, 7 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/scripts/v8_methods.py » ('j') | Source/bindings/v8/V8BindingMacros.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 4f6cf147e98c965eff7b04c1904e4000066c66ea..f9416559192313f28a117430890b7060723bf1b0 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -560,10 +560,15 @@ def Counter(iterable):
# [Constructor]
def generate_constructor(interface, constructor):
+ generated_arguments = [v8_methods.generate_argument(interface, constructor, argument, index)
+ for index, argument in enumerate(constructor.arguments)]
+
return {
'argument_list': constructor_argument_list(interface, constructor),
- 'arguments': [v8_methods.generate_argument(interface, constructor, argument, index)
- for index, argument in enumerate(constructor.arguments)],
+ 'arguments': generated_arguments,
+ 'arguments_need_try_catch': any(
+ v8_methods.argument_needs_try_catch(argument)
+ for argument in generated_arguments),
'cpp_type': cpp_template_type(
cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)),
cpp_name(interface)),
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | Source/bindings/v8/V8BindingMacros.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698