| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 elif ('RaisesException' in method.extended_attributes or | 305 elif ('RaisesException' in method.extended_attributes or |
| 306 (method.is_constructor and | 306 (method.is_constructor and |
| 307 has_extended_attribute_value(interface, 'RaisesException', 'Constructor
'))): | 307 has_extended_attribute_value(interface, 'RaisesException', 'Constructor
'))): |
| 308 cpp_arguments.append('exceptionState') | 308 cpp_arguments.append('exceptionState') |
| 309 | 309 |
| 310 if method.name == 'Constructor': | 310 if method.name == 'Constructor': |
| 311 base_name = 'create' | 311 base_name = 'create' |
| 312 elif method.name == 'NamedConstructor': | 312 elif method.name == 'NamedConstructor': |
| 313 base_name = 'createForJSConstructor' | 313 base_name = 'createForJSConstructor' |
| 314 elif 'ImplementedInPrivateScript' in method.extended_attributes: | 314 elif 'ImplementedInPrivateScript' in method.extended_attributes: |
| 315 base_name = '%sMethodImplementedInPrivateScript' % method.name | 315 base_name = '%sMethod' % method.name |
| 316 else: | 316 else: |
| 317 base_name = v8_utilities.cpp_name(method) | 317 base_name = v8_utilities.cpp_name(method) |
| 318 | 318 |
| 319 cpp_method_name = v8_utilities.scoped_name(interface, method, base_name) | 319 cpp_method_name = v8_utilities.scoped_name(interface, method, base_name) |
| 320 return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments)) | 320 return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments)) |
| 321 | 321 |
| 322 | 322 |
| 323 def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
: | 323 def v8_set_return_value(interface_name, method, cpp_value, for_main_world=False)
: |
| 324 idl_type = method.idl_type | 324 idl_type = method.idl_type |
| 325 extended_attributes = method.extended_attributes | 325 extended_attributes = method.extended_attributes |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 | 395 |
| 396 def argument_default_cpp_value(argument): | 396 def argument_default_cpp_value(argument): |
| 397 if not argument.default_value: | 397 if not argument.default_value: |
| 398 return None | 398 return None |
| 399 return argument.idl_type.literal_cpp_value(argument.default_value) | 399 return argument.idl_type.literal_cpp_value(argument.default_value) |
| 400 | 400 |
| 401 IdlType.union_arguments = property(lambda self: None) | 401 IdlType.union_arguments = property(lambda self: None) |
| 402 IdlUnionType.union_arguments = property(union_arguments) | 402 IdlUnionType.union_arguments = property(union_arguments) |
| 403 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 403 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
| OLD | NEW |