| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 try: | 374 try: |
| 375 attribute = next(candidate | 375 attribute = next(candidate |
| 376 for candidate in interface.attributes | 376 for candidate in interface.attributes |
| 377 if candidate.name == target_attribute_name) | 377 if candidate.name == target_attribute_name) |
| 378 except StopIteration: | 378 except StopIteration: |
| 379 raise Exception('[PutForward] target not found:\n' | 379 raise Exception('[PutForward] target not found:\n' |
| 380 'Attribute "%s" is not present in interface "%s"' % | 380 'Attribute "%s" is not present in interface "%s"' % |
| 381 (target_attribute_name, target_interface_name)) | 381 (target_attribute_name, target_interface_name)) |
| 382 | 382 |
| 383 if ('Replaceable' in attribute.extended_attributes): | 383 if ('Replaceable' in attribute.extended_attributes): |
| 384 context['cpp_setter'] = 'v8CallBoolean(info.This()->CreateDataProperty(i
nfo.GetIsolate()->GetCurrentContext(), propertyName, v8Value))' | 384 context['cpp_setter'] = 'v8CallBoolean(info.Holder()->CreateDataProperty
(info.GetIsolate()->GetCurrentContext(), propertyName, v8Value))' |
| 385 return | 385 return |
| 386 | 386 |
| 387 extended_attributes = attribute.extended_attributes | 387 extended_attributes = attribute.extended_attributes |
| 388 idl_type = attribute.idl_type | 388 idl_type = attribute.idl_type |
| 389 | 389 |
| 390 # [RaisesException], [RaisesException=Setter] | 390 # [RaisesException], [RaisesException=Setter] |
| 391 is_setter_raises_exception = ( | 391 is_setter_raises_exception = ( |
| 392 'RaisesException' in extended_attributes and | 392 'RaisesException' in extended_attributes and |
| 393 extended_attributes['RaisesException'] in [None, 'Setter']) | 393 extended_attributes['RaisesException'] in [None, 'Setter']) |
| 394 # [LegacyInterfaceTypeChecking] | 394 # [LegacyInterfaceTypeChecking] |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 lambda self: strip_suffix(self.base_type, 'Constructor')) | 567 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 568 | 568 |
| 569 | 569 |
| 570 def is_constructor_attribute(attribute): | 570 def is_constructor_attribute(attribute): |
| 571 # FIXME: replace this with [ConstructorAttribute] extended attribute | 571 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 572 return attribute.idl_type.name.endswith('Constructor') | 572 return attribute.idl_type.name.endswith('Constructor') |
| 573 | 573 |
| 574 | 574 |
| 575 def update_constructor_attribute_context(interface, attribute, context): | 575 def update_constructor_attribute_context(interface, attribute, context): |
| 576 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 576 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |