| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is
olate()', used_in_private_script=True), | 176 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is
olate()', used_in_private_script=True), |
| 177 'property_attributes': property_attributes(method), | 177 'property_attributes': property_attributes(method), |
| 178 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m
ethod), # [RuntimeEnabled] | 178 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m
ethod), # [RuntimeEnabled] |
| 179 'should_be_exposed_to_script': not (is_implemented_in_private_script and
is_only_exposed_to_private_script), | 179 'should_be_exposed_to_script': not (is_implemented_in_private_script and
is_only_exposed_to_private_script), |
| 180 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig
nature' in extended_attributes else 'defaultSignature', | 180 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig
nature' in extended_attributes else 'defaultSignature', |
| 181 'union_arguments': idl_type.union_arguments, | 181 'union_arguments': idl_type.union_arguments, |
| 182 'use_local_result': use_local_result(method), | 182 'use_local_result': use_local_result(method), |
| 183 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), | 183 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), |
| 184 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), | 184 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), |
| 185 'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended
_attributes else [''], # [PerWorldBindings], | 185 'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended
_attributes else [''], # [PerWorldBindings], |
| 186 'visible': True, |
| 186 } | 187 } |
| 187 | 188 |
| 188 | 189 |
| 189 def argument_context(interface, method, argument, index): | 190 def argument_context(interface, method, argument, index): |
| 190 extended_attributes = argument.extended_attributes | 191 extended_attributes = argument.extended_attributes |
| 191 idl_type = argument.idl_type | 192 idl_type = argument.idl_type |
| 192 this_cpp_value = cpp_value(interface, method, index) | 193 this_cpp_value = cpp_value(interface, method, index) |
| 193 is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type | 194 is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type |
| 194 | 195 |
| 195 if ('ImplementedInPrivateScript' in extended_attributes and | 196 if ('ImplementedInPrivateScript' in extended_attributes and |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 442 |
| 442 IdlOperation.returns_promise = property(method_returns_promise) | 443 IdlOperation.returns_promise = property(method_returns_promise) |
| 443 | 444 |
| 444 | 445 |
| 445 def argument_conversion_needs_exception_state(method, argument): | 446 def argument_conversion_needs_exception_state(method, argument): |
| 446 idl_type = argument.idl_type | 447 idl_type = argument.idl_type |
| 447 return (idl_type.v8_conversion_needs_exception_state or | 448 return (idl_type.v8_conversion_needs_exception_state or |
| 448 argument.is_variadic or | 449 argument.is_variadic or |
| 449 (method.returns_promise and (idl_type.is_string_type or | 450 (method.returns_promise and (idl_type.is_string_type or |
| 450 idl_type.is_enum))) | 451 idl_type.is_enum))) |
| OLD | NEW |