| 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 def getter_expression(interface, attribute, contents): | 192 def getter_expression(interface, attribute, contents): |
| 193 arguments = [] | 193 arguments = [] |
| 194 this_getter_base_name = getter_base_name(interface, attribute, arguments) | 194 this_getter_base_name = getter_base_name(interface, attribute, arguments) |
| 195 getter_name = scoped_name(interface, attribute, this_getter_base_name) | 195 getter_name = scoped_name(interface, attribute, this_getter_base_name) |
| 196 | 196 |
| 197 arguments.extend(v8_utilities.call_with_arguments(attribute)) | 197 arguments.extend(v8_utilities.call_with_arguments(attribute)) |
| 198 if ('ImplementedBy' in attribute.extended_attributes and | 198 if ('ImplementedBy' in attribute.extended_attributes and |
| 199 not attribute.is_static): | 199 not attribute.is_static): |
| 200 arguments.append('*impl') | 200 arguments.append('*impl') |
| 201 if attribute.idl_type.is_nullable: | 201 if attribute.idl_type.is_nullable and not contents['has_strict_type_checking
']: |
| 202 arguments.append('isNull') | 202 arguments.append('isNull') |
| 203 if contents['is_getter_raises_exception']: | 203 if contents['is_getter_raises_exception']: |
| 204 arguments.append('exceptionState') | 204 arguments.append('exceptionState') |
| 205 return '%s(%s)' % (getter_name, ', '.join(arguments)) | 205 return '%s(%s)' % (getter_name, ', '.join(arguments)) |
| 206 | 206 |
| 207 | 207 |
| 208 CONTENT_ATTRIBUTE_GETTER_NAMES = { | 208 CONTENT_ATTRIBUTE_GETTER_NAMES = { |
| 209 'boolean': 'fastHasAttribute', | 209 'boolean': 'fastHasAttribute', |
| 210 'long': 'getIntegralAttribute', | 210 'long': 'getIntegralAttribute', |
| 211 'unsigned long': 'getUnsignedIntegralAttribute', | 211 'unsigned long': 'getUnsignedIntegralAttribute', |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 lambda self: strip_suffix(self.base_type, 'Constructor')) | 398 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 399 | 399 |
| 400 | 400 |
| 401 def is_constructor_attribute(attribute): | 401 def is_constructor_attribute(attribute): |
| 402 # FIXME: replace this with [ConstructorAttribute] extended attribute | 402 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 403 return attribute.idl_type.base_type.endswith('Constructor') | 403 return attribute.idl_type.base_type.endswith('Constructor') |
| 404 | 404 |
| 405 | 405 |
| 406 def generate_constructor_getter(interface, attribute, contents): | 406 def generate_constructor_getter(interface, attribute, contents): |
| 407 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 407 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
| OLD | NEW |