OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 is_constructor_raises_exception = \ | 862 is_constructor_raises_exception = \ |
863 interface.extended_attributes.get('RaisesException') == 'Constructor' | 863 interface.extended_attributes.get('RaisesException') == 'Constructor' |
864 | 864 |
865 return { | 865 return { |
866 'arguments': [v8_methods.argument_context(interface, constructor, argume
nt, index) | 866 'arguments': [v8_methods.argument_context(interface, constructor, argume
nt, index) |
867 for index, argument in enumerate(constructor.arguments)], | 867 for index, argument in enumerate(constructor.arguments)], |
868 'arguments_need_try_catch': arguments_need_try_catch, | 868 'arguments_need_try_catch': arguments_need_try_catch, |
869 'cpp_type': cpp_template_type( | 869 'cpp_type': cpp_template_type( |
870 cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)), | 870 cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)), |
871 cpp_name(interface)), | 871 cpp_name(interface)), |
872 'cpp_value': v8_methods.cpp_value( | 872 'cpp_value': v8_methods.cpp_value(interface, constructor), |
873 interface, constructor, len(constructor.arguments)), | |
874 'has_exception_state': | 873 'has_exception_state': |
875 is_constructor_raises_exception or | 874 is_constructor_raises_exception or |
876 any(argument for argument in constructor.arguments | 875 any(argument for argument in constructor.arguments |
877 if argument.idl_type.name == 'SerializedScriptValue' or | 876 if argument.idl_type.name == 'SerializedScriptValue' or |
878 argument.idl_type.may_raise_exception_on_conversion), | 877 argument.idl_type.may_raise_exception_on_conversion), |
879 'is_call_with_document': | 878 'is_call_with_document': |
880 # [ConstructorCallWith=Document] | 879 # [ConstructorCallWith=Document] |
881 has_extended_attribute_value(interface, | 880 has_extended_attribute_value(interface, |
882 'ConstructorCallWith', 'Document'), | 881 'ConstructorCallWith', 'Document'), |
883 'is_call_with_execution_context': | 882 'is_call_with_execution_context': |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 deleter = next( | 1109 deleter = next( |
1111 method | 1110 method |
1112 for method in interface.operations | 1111 for method in interface.operations |
1113 if ('deleter' in method.specials and | 1112 if ('deleter' in method.specials and |
1114 len(method.arguments) == 1 and | 1113 len(method.arguments) == 1 and |
1115 str(method.arguments[0].idl_type) == 'DOMString')) | 1114 str(method.arguments[0].idl_type) == 'DOMString')) |
1116 except StopIteration: | 1115 except StopIteration: |
1117 return None | 1116 return None |
1118 | 1117 |
1119 return property_deleter(deleter) | 1118 return property_deleter(deleter) |
OLD | NEW |