| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 elif ('RaisesException' in method.extended_attributes or | 304 elif ('RaisesException' in method.extended_attributes or |
| 305 (method.is_constructor and | 305 (method.is_constructor and |
| 306 has_extended_attribute_value(interface, 'RaisesException', 'Constructor
'))): | 306 has_extended_attribute_value(interface, 'RaisesException', 'Constructor
'))): |
| 307 cpp_arguments.append('exceptionState') | 307 cpp_arguments.append('exceptionState') |
| 308 | 308 |
| 309 if method.name == 'Constructor': | 309 if method.name == 'Constructor': |
| 310 base_name = 'create' | 310 base_name = 'create' |
| 311 elif method.name == 'NamedConstructor': | 311 elif method.name == 'NamedConstructor': |
| 312 base_name = 'createForJSConstructor' | 312 base_name = 'createForJSConstructor' |
| 313 elif 'ImplementedInPrivateScript' in method.extended_attributes: | 313 elif 'ImplementedInPrivateScript' in method.extended_attributes: |
| 314 base_name = '%sMethodImplementedInPrivateScript' % method.name | 314 base_name = '%sMethod' % method.name |
| 315 else: | 315 else: |
| 316 base_name = v8_utilities.cpp_name(method) | 316 base_name = v8_utilities.cpp_name(method) |
| 317 | 317 |
| 318 cpp_method_name = v8_utilities.scoped_name(interface, method, base_name) | 318 cpp_method_name = v8_utilities.scoped_name(interface, method, base_name) |
| 319 return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments)) | 319 return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments)) |
| 320 | 320 |
| 321 | 321 |
| 322 def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
: | 322 def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
: |
| 323 idl_type = method.idl_type | 323 idl_type = method.idl_type |
| 324 extended_attributes = method.extended_attributes | 324 extended_attributes = method.extended_attributes |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 393 |
| 394 | 394 |
| 395 def argument_default_cpp_value(argument): | 395 def argument_default_cpp_value(argument): |
| 396 if not argument.default_value: | 396 if not argument.default_value: |
| 397 return None | 397 return None |
| 398 return argument.idl_type.literal_cpp_value(argument.default_value) | 398 return argument.idl_type.literal_cpp_value(argument.default_value) |
| 399 | 399 |
| 400 IdlType.union_arguments = property(lambda self: None) | 400 IdlType.union_arguments = property(lambda self: None) |
| 401 IdlUnionType.union_arguments = property(union_arguments) | 401 IdlUnionType.union_arguments = property(union_arguments) |
| 402 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 402 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
| OLD | NEW |