| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrentCont
ext())') | 365 arguments.append('toFrameIfNotDetached(info.GetIsolate()->GetCurrentCont
ext())') |
| 366 arguments.append('impl') | 366 arguments.append('impl') |
| 367 arguments.append('cppValue') | 367 arguments.append('cppValue') |
| 368 elif idl_type.base_type == 'EventHandler': | 368 elif idl_type.base_type == 'EventHandler': |
| 369 getter_name = scoped_name(interface, attribute, cpp_name(attribute)) | 369 getter_name = scoped_name(interface, attribute, cpp_name(attribute)) |
| 370 context['event_handler_getter_expression'] = '%s(%s)' % ( | 370 context['event_handler_getter_expression'] = '%s(%s)' % ( |
| 371 getter_name, ', '.join(arguments)) | 371 getter_name, ', '.join(arguments)) |
| 372 if (interface.name in ['Window'] and | 372 if (interface.name in ['Window'] and |
| 373 attribute.name == 'onerror'): | 373 attribute.name == 'onerror'): |
| 374 includes.add('bindings/core/v8/V8ErrorHandler.h') | 374 includes.add('bindings/core/v8/V8ErrorHandler.h') |
| 375 arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHa
ndler>(v8Value, true, ScriptState::current(info.GetIsolate()))') | 375 arguments.append('V8EventListenerList::findOrCreateWrapper<V8ErrorHa
ndler>(v8Value, ScriptState::current(info.GetIsolate()))') |
| 376 else: | 376 else: |
| 377 arguments.append('V8EventListenerList::getEventListener(ScriptState:
:current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)') | 377 arguments.append('V8EventListenerList::getEventListener(ScriptState:
:current(info.GetIsolate()), v8Value, ListenerFindOrCreate)') |
| 378 elif idl_type.is_interface_type: | 378 elif idl_type.is_interface_type: |
| 379 # FIXME: should be able to eliminate WTF::getPtr in most or all cases | 379 # FIXME: should be able to eliminate WTF::getPtr in most or all cases |
| 380 arguments.append('WTF::getPtr(cppValue)') | 380 arguments.append('WTF::getPtr(cppValue)') |
| 381 else: | 381 else: |
| 382 arguments.append('cppValue') | 382 arguments.append('cppValue') |
| 383 if context['is_setter_raises_exception']: | 383 if context['is_setter_raises_exception']: |
| 384 arguments.append('exceptionState') | 384 arguments.append('exceptionState') |
| 385 | 385 |
| 386 return '%s(%s)' % (setter_name, ', '.join(arguments)) | 386 return '%s(%s)' % (setter_name, ', '.join(arguments)) |
| 387 | 387 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 lambda self: strip_suffix(self.base_type, 'Constructor')) | 485 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 486 | 486 |
| 487 | 487 |
| 488 def is_constructor_attribute(attribute): | 488 def is_constructor_attribute(attribute): |
| 489 # FIXME: replace this with [ConstructorAttribute] extended attribute | 489 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 490 return attribute.idl_type.name.endswith('Constructor') | 490 return attribute.idl_type.name.endswith('Constructor') |
| 491 | 491 |
| 492 | 492 |
| 493 def constructor_getter_context(interface, attribute, context): | 493 def constructor_getter_context(interface, attribute, context): |
| 494 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 494 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |