| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 idl_type.is_callback_interface or | 61 idl_type.is_callback_interface or |
| 62 base_type == 'SerializedScriptValue' or | 62 base_type == 'SerializedScriptValue' or |
| 63 (argument.is_variadic and idl_type.is_wrapper_type) or | 63 (argument.is_variadic and idl_type.is_wrapper_type) or |
| 64 # String and enumeration arguments converted using one of the | 64 # String and enumeration arguments converted using one of the |
| 65 # TOSTRING_* macros in Source/bindings/core/v8/V8BindingMacros.h don't | 65 # TOSTRING_* macros in Source/bindings/core/v8/V8BindingMacros.h don't |
| 66 # use a v8::TryCatch. | 66 # use a v8::TryCatch. |
| 67 (base_type == 'DOMString' and not argument.is_variadic)) | 67 (base_type == 'DOMString' and not argument.is_variadic)) |
| 68 | 68 |
| 69 | 69 |
| 70 def use_local_result(method): | 70 def use_local_result(method): |
| 71 extended_attributes = method.extended_attributes | 71 return True |
| 72 idl_type = method.idl_type | |
| 73 return (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or | |
| 74 'ImplementedInPrivateScript' in extended_attributes or | |
| 75 'RaisesException' in extended_attributes or | |
| 76 idl_type.is_union_type or | |
| 77 (idl_type.is_nullable and not idl_type.is_nullable_simple)) | |
| 78 | 72 |
| 79 | 73 |
| 80 def method_context(interface, method): | 74 def method_context(interface, method): |
| 81 arguments = method.arguments | 75 arguments = method.arguments |
| 82 extended_attributes = method.extended_attributes | 76 extended_attributes = method.extended_attributes |
| 83 idl_type = method.idl_type | 77 idl_type = method.idl_type |
| 84 is_static = method.is_static | 78 is_static = method.is_static |
| 85 name = method.name | 79 name = method.name |
| 86 | 80 |
| 87 idl_type.add_includes_for_type() | 81 idl_type.add_includes_for_type() |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 386 |
| 393 | 387 |
| 394 def argument_default_cpp_value(argument): | 388 def argument_default_cpp_value(argument): |
| 395 if not argument.default_value: | 389 if not argument.default_value: |
| 396 return None | 390 return None |
| 397 return argument.idl_type.literal_cpp_value(argument.default_value) | 391 return argument.idl_type.literal_cpp_value(argument.default_value) |
| 398 | 392 |
| 399 IdlType.union_arguments = property(lambda self: None) | 393 IdlType.union_arguments = property(lambda self: None) |
| 400 IdlUnionType.union_arguments = property(union_arguments) | 394 IdlUnionType.union_arguments = property(union_arguments) |
| 401 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 395 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
| OLD | NEW |