| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 # Value handling | 289 # Value handling |
| 290 ################################################################################ | 290 ################################################################################ |
| 291 | 291 |
| 292 def cpp_value(interface, method, number_of_arguments): | 292 def cpp_value(interface, method, number_of_arguments): |
| 293 def cpp_argument(argument): | 293 def cpp_argument(argument): |
| 294 idl_type = argument.idl_type | 294 idl_type = argument.idl_type |
| 295 if idl_type.name == 'EventListener': | 295 if idl_type.name == 'EventListener': |
| 296 return argument.name | 296 return argument.name |
| 297 if idl_type.is_dictionary: | 297 if idl_type.is_dictionary: |
| 298 return '*%s' % argument.name | 298 return '*%s' % argument.name |
| 299 if (idl_type.is_callback_interface or | 299 if (idl_type.name in ['NodeFilter', 'NodeFilterOrNull', |
| 300 idl_type.name in ['NodeFilter', 'NodeFilterOrNull', | |
| 301 'XPathNSResolver', 'XPathNSResolverOrNull']): | 300 'XPathNSResolver', 'XPathNSResolverOrNull']): |
| 302 # FIXME: remove this special case | 301 # FIXME: remove this special case |
| 303 return '%s.release()' % argument.name | 302 return '%s.release()' % argument.name |
| 304 return argument.name | 303 return argument.name |
| 305 | 304 |
| 306 # Truncate omitted optional arguments | 305 # Truncate omitted optional arguments |
| 307 arguments = method.arguments[:number_of_arguments] | 306 arguments = method.arguments[:number_of_arguments] |
| 308 cpp_arguments = [] | 307 cpp_arguments = [] |
| 309 if 'ImplementedInPrivateScript' in method.extended_attributes: | 308 if 'ImplementedInPrivateScript' in method.extended_attributes: |
| 310 cpp_arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrent
Context())') | 309 cpp_arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrent
Context())') |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 IdlTypeBase.union_arguments = None | 470 IdlTypeBase.union_arguments = None |
| 472 IdlUnionType.union_arguments = property(union_arguments) | 471 IdlUnionType.union_arguments = property(union_arguments) |
| 473 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 472 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
| 474 | 473 |
| 475 | 474 |
| 476 def v8_conversion_needs_exception_state(argument): | 475 def v8_conversion_needs_exception_state(argument): |
| 477 return (argument.idl_type.v8_conversion_needs_exception_state or | 476 return (argument.idl_type.v8_conversion_needs_exception_state or |
| 478 argument.is_variadic) | 477 argument.is_variadic) |
| 479 | 478 |
| 480 IdlArgument.v8_conversion_needs_exception_state = property(v8_conversion_needs_e
xception_state) | 479 IdlArgument.v8_conversion_needs_exception_state = property(v8_conversion_needs_e
xception_state) |
| OLD | NEW |