| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 'is_call_with_script_state': is_call_with_script_state, | 102 'is_call_with_script_state': is_call_with_script_state, |
| 103 'is_check_security_for_frame': is_check_security_for_frame, | 103 'is_check_security_for_frame': is_check_security_for_frame, |
| 104 'is_check_security_for_node': is_check_security_for_node, | 104 'is_check_security_for_node': is_check_security_for_node, |
| 105 'is_custom': 'Custom' in extended_attributes, | 105 'is_custom': 'Custom' in extended_attributes, |
| 106 'is_custom_element_callbacks': is_custom_element_callbacks, | 106 'is_custom_element_callbacks': is_custom_element_callbacks, |
| 107 'is_do_not_check_security': 'DoNotCheckSecurity' in extended_attributes, | 107 'is_do_not_check_security': 'DoNotCheckSecurity' in extended_attributes, |
| 108 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, | 108 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, |
| 109 'is_raises_exception': is_raises_exception, | 109 'is_raises_exception': is_raises_exception, |
| 110 'is_read_only': 'ReadOnly' in extended_attributes, | 110 'is_read_only': 'ReadOnly' in extended_attributes, |
| 111 'is_static': is_static, | 111 'is_static': is_static, |
| 112 'is_strict_type_checking': 'StrictTypeChecking' in extended_attributes, | 112 'is_strict_type_checking': |
| 113 'StrictTypeChecking' in extended_attributes or |
| 114 'StrictTypeChecking' in interface.extended_attributes, |
| 113 'is_variadic': arguments and arguments[-1].is_variadic, | 115 'is_variadic': arguments and arguments[-1].is_variadic, |
| 114 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] | 116 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] |
| 115 'name': name, | 117 'name': name, |
| 116 'number_of_arguments': len(arguments), | 118 'number_of_arguments': len(arguments), |
| 117 'number_of_required_arguments': len([ | 119 'number_of_required_arguments': len([ |
| 118 argument for argument in arguments | 120 argument for argument in arguments |
| 119 if not (argument.is_optional or argument.is_variadic)]), | 121 if not (argument.is_optional or argument.is_variadic)]), |
| 120 'number_of_required_or_variadic_arguments': len([ | 122 'number_of_required_or_variadic_arguments': len([ |
| 121 argument for argument in arguments | 123 argument for argument in arguments |
| 122 if not argument.is_optional]), | 124 if not argument.is_optional]), |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c
pp_type}>(info, {index}))'.format( | 217 return 'V8TRYCATCH_VOID(Vector<{cpp_type}>, {name}, toNativeArguments<{c
pp_type}>(info, {index}))'.format( |
| 216 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index) | 218 cpp_type=v8_types.cpp_type(idl_type), name=name, index=index) |
| 217 # [Default=NullString] | 219 # [Default=NullString] |
| 218 if (argument.is_optional and idl_type == 'DOMString' and | 220 if (argument.is_optional and idl_type == 'DOMString' and |
| 219 extended_attributes.get('Default') == 'NullString'): | 221 extended_attributes.get('Default') == 'NullString'): |
| 220 v8_value = 'argumentOrNull(info, %s)' % index | 222 v8_value = 'argumentOrNull(info, %s)' % index |
| 221 else: | 223 else: |
| 222 v8_value = 'info[%s]' % index | 224 v8_value = 'info[%s]' % index |
| 223 return v8_types.v8_value_to_local_cpp_value( | 225 return v8_types.v8_value_to_local_cpp_value( |
| 224 idl_type, argument.extended_attributes, v8_value, name, index=index) | 226 idl_type, argument.extended_attributes, v8_value, name, index=index) |
| OLD | NEW |