| Index: Source/bindings/scripts/v8_methods.py
|
| diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
|
| index b50ba604efeda5d30d6904c14ab2371aec03b82c..7dcf3a1031657b903fdda8e05ed449f89b4215a3 100644
|
| --- a/Source/bindings/scripts/v8_methods.py
|
| +++ b/Source/bindings/scripts/v8_methods.py
|
| @@ -77,10 +77,12 @@ def generate_method(interface, method):
|
| if is_call_with_script_arguments:
|
| includes.update(['bindings/v8/ScriptCallStackFactory.h',
|
| 'core/inspector/ScriptArguments.h'])
|
| - is_call_with_script_state = has_extended_attribute_value(method, 'CallWith', 'ScriptState')
|
| + is_call_with_script_state = has_extended_attribute_value(
|
| + method, 'CallWith', 'ScriptState')
|
| if is_call_with_script_state:
|
| includes.add('bindings/v8/ScriptState.h')
|
| - is_check_security_for_node = 'CheckSecurity' in extended_attributes
|
| + is_check_security_for_node = has_extended_attribute_value(
|
| + method, 'CheckSecurity', 'Node')
|
| if is_check_security_for_node:
|
| includes.add('bindings/v8/BindingSecurity.h')
|
| is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attributes
|
| @@ -89,9 +91,9 @@ def generate_method(interface, method):
|
|
|
| has_event_listener_argument = any(
|
| argument for argument in arguments
|
| - if argument.idl_type.name == 'EventListener')
|
| + if argument.idl_type.name == 'EventListenerOrNull')
|
| is_check_security_for_frame = (
|
| - 'CheckSecurity' in interface.extended_attributes and
|
| + has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and
|
| 'DoNotCheckSecurity' not in extended_attributes)
|
| is_raises_exception = 'RaisesException' in extended_attributes
|
|
|
| @@ -115,9 +117,9 @@ def generate_method(interface, method):
|
| 'idl_type': idl_type.base_type,
|
| 'has_event_listener_argument': has_event_listener_argument,
|
| 'has_exception_state':
|
| - has_event_listener_argument or
|
| is_raises_exception or
|
| is_check_security_for_frame or
|
| + has_extended_attribute_value(interface, 'CheckSecurity', 'Window') or
|
| any(argument for argument in arguments
|
| if argument.idl_type.name == 'SerializedScriptValue' or
|
| argument.idl_type.is_integer_type),
|
| @@ -172,7 +174,7 @@ def generate_argument(interface, method, argument, index):
|
| 'has_default': 'Default' in extended_attributes,
|
| 'has_event_listener_argument': any(
|
| argument_so_far for argument_so_far in method.arguments[:index]
|
| - if argument_so_far.idl_type.name == 'EventListener'),
|
| + if argument_so_far.idl_type.name == 'EventListenerOrNull'),
|
| 'has_type_checking_interface':
|
| (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
|
| has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and
|
| @@ -206,7 +208,7 @@ def generate_argument(interface, method, argument, index):
|
| def cpp_value(interface, method, number_of_arguments):
|
| def cpp_argument(argument):
|
| idl_type = argument.idl_type
|
| - if idl_type.name == 'EventListener':
|
| + if idl_type.name == 'EventListenerOrNull':
|
| if (interface.name == 'EventTarget' and
|
| method.name == 'removeEventListener'):
|
| # FIXME: remove this special case by moving get() into
|
|
|