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

Side by Side Diff: Source/bindings/scripts/v8_interface.py

Issue 304223007: Use auto-rethrowing v8::TryCatch variant (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: make constructors explicit Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 # Constructors 748 # Constructors
749 ################################################################################ 749 ################################################################################
750 750
751 # [Constructor] 751 # [Constructor]
752 def generate_constructor(interface, constructor): 752 def generate_constructor(interface, constructor):
753 arguments_need_try_catch = any(v8_methods.argument_needs_try_catch(argument) 753 arguments_need_try_catch = any(v8_methods.argument_needs_try_catch(argument)
754 for argument in constructor.arguments) 754 for argument in constructor.arguments)
755 755
756 return { 756 return {
757 'argument_list': constructor_argument_list(interface, constructor), 757 'argument_list': constructor_argument_list(interface, constructor),
758 'arguments': [v8_methods.generate_argument(interface, constructor, argum ent, index, arguments_need_try_catch) 758 'arguments': [v8_methods.generate_argument(interface, constructor, argum ent, index)
759 for index, argument in enumerate(constructor.arguments)], 759 for index, argument in enumerate(constructor.arguments)],
760 'arguments_need_try_catch': arguments_need_try_catch, 760 'arguments_need_try_catch': arguments_need_try_catch,
761 'cpp_type': cpp_template_type( 761 'cpp_type': cpp_template_type(
762 cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)), 762 cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)),
763 cpp_name(interface)), 763 cpp_name(interface)),
764 'has_exception_state': 764 'has_exception_state':
765 # [RaisesException=Constructor] 765 # [RaisesException=Constructor]
766 interface.extended_attributes.get('RaisesException') == 'Constructor ' or 766 interface.extended_attributes.get('RaisesException') == 'Constructor ' or
767 any(argument for argument in constructor.arguments 767 any(argument for argument in constructor.arguments
768 if argument.idl_type.name == 'SerializedScriptValue' or 768 if argument.idl_type.name == 'SerializedScriptValue' or
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 deleter = next( 1007 deleter = next(
1008 method 1008 method
1009 for method in interface.operations 1009 for method in interface.operations
1010 if ('deleter' in method.specials and 1010 if ('deleter' in method.specials and
1011 len(method.arguments) == 1 and 1011 len(method.arguments) == 1 and
1012 str(method.arguments[0].idl_type) == 'DOMString')) 1012 str(method.arguments[0].idl_type) == 'DOMString'))
1013 except StopIteration: 1013 except StopIteration:
1014 return None 1014 return None
1015 1015
1016 return property_deleter(deleter) 1016 return property_deleter(deleter)
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698