| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 | 203 |
| 204 def argument_context(interface, method, argument, index, is_visible=True): | 204 def argument_context(interface, method, argument, index, is_visible=True): |
| 205 extended_attributes = argument.extended_attributes | 205 extended_attributes = argument.extended_attributes |
| 206 idl_type = argument.idl_type | 206 idl_type = argument.idl_type |
| 207 if is_visible: | 207 if is_visible: |
| 208 idl_type.add_includes_for_type(extended_attributes) | 208 idl_type.add_includes_for_type(extended_attributes) |
| 209 this_cpp_value = cpp_value(interface, method, index) | 209 this_cpp_value = cpp_value(interface, method, index) |
| 210 is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type | 210 is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type |
| 211 | 211 |
| 212 # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking] | 212 # [LegacyInterfaceTypeChecking] |
| 213 has_type_checking_interface = ( | 213 has_type_checking_interface = ( |
| 214 not is_legacy_interface_type_checking(interface, method) and | 214 not is_legacy_interface_type_checking(interface, method) and |
| 215 idl_type.is_wrapper_type) | 215 idl_type.is_wrapper_type) |
| 216 | 216 |
| 217 if ('ImplementedInPrivateScript' in extended_attributes and | 217 if ('ImplementedInPrivateScript' in extended_attributes and |
| 218 not idl_type.is_wrapper_type and | 218 not idl_type.is_wrapper_type and |
| 219 not idl_type.is_basic_type): | 219 not idl_type.is_basic_type): |
| 220 raise Exception('Private scripts supports only primitive types and DOM w
rappers.') | 220 raise Exception('Private scripts supports only primitive types and DOM w
rappers.') |
| 221 | 221 |
| 222 set_default_value = argument.set_default_value | 222 set_default_value = argument.set_default_value |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 return method.idl_type and method.idl_type.name == 'Promise' | 463 return method.idl_type and method.idl_type.name == 'Promise' |
| 464 | 464 |
| 465 IdlOperation.returns_promise = property(method_returns_promise) | 465 IdlOperation.returns_promise = property(method_returns_promise) |
| 466 | 466 |
| 467 | 467 |
| 468 def argument_conversion_needs_exception_state(method, argument): | 468 def argument_conversion_needs_exception_state(method, argument): |
| 469 idl_type = argument.idl_type | 469 idl_type = argument.idl_type |
| 470 return (idl_type.v8_conversion_needs_exception_state or | 470 return (idl_type.v8_conversion_needs_exception_state or |
| 471 argument.is_variadic or | 471 argument.is_variadic or |
| 472 (method.returns_promise and idl_type.is_string_type)) | 472 (method.returns_promise and idl_type.is_string_type)) |
| OLD | NEW |