Chromium Code Reviews| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 # FIXME: Remove generic 'Dictionary' special-casing | 225 # FIXME: Remove generic 'Dictionary' special-casing |
| 226 'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictio nary', | 226 'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictio nary', |
| 227 'is_nullable': idl_type.is_nullable, | 227 'is_nullable': idl_type.is_nullable, |
| 228 'is_optional': argument.is_optional, | 228 'is_optional': argument.is_optional, |
| 229 'is_variadic_wrapper_type': is_variadic_wrapper_type, | 229 'is_variadic_wrapper_type': is_variadic_wrapper_type, |
| 230 'is_wrapper_type': idl_type.is_wrapper_type, | 230 'is_wrapper_type': idl_type.is_wrapper_type, |
| 231 'name': argument.name, | 231 'name': argument.name, |
| 232 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( | 232 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( |
| 233 argument.name, isolate='scriptState->isolate()', | 233 argument.name, isolate='scriptState->isolate()', |
| 234 creation_context='scriptState->context()->Global()'), | 234 creation_context='scriptState->context()->Global()'), |
| 235 'type_checked_already': False, | |
|
Nils Barth (inactive)
2014/10/13 14:36:56
Is this needed?
(Absent variables default to None/
yunchao
2014/10/14 06:58:49
Acknowledged.
| |
| 235 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), | 236 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), |
| 236 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), | 237 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), |
| 237 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=method.returns_promise), | 238 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=method.returns_promise), |
| 238 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc _type), | 239 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc _type), |
| 239 } | 240 } |
| 240 | 241 |
| 241 | 242 |
| 242 def argument_declarations_for_private_script(interface, method): | 243 def argument_declarations_for_private_script(interface, method): |
| 243 argument_declarations = ['LocalFrame* frame'] | 244 argument_declarations = ['LocalFrame* frame'] |
| 244 argument_declarations.append('%s* holderImpl' % interface.name) | 245 argument_declarations.append('%s* holderImpl' % interface.name) |
| (...skipping 196 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 |