Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: Source/bindings/scripts/v8_methods.py

Issue 331323012: Revert of Throw TypeError when addEventListener or removeEventListener are called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 80fe8d9ecb809ab417133b48c405c82ae00c854d..fd82bad2f192307617dcaba854c1d25bc3e76467 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -88,12 +88,10 @@
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 = has_extended_attribute_value(
- method, 'CheckSecurity', 'Node')
+ is_check_security_for_node = 'CheckSecurity' in extended_attributes
if is_check_security_for_node:
includes.add('bindings/v8/BindingSecurity.h')
is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attributes
@@ -102,9 +100,9 @@
has_event_listener_argument = any(
argument for argument in arguments
- if argument.idl_type.name == 'EventListenerOrNull')
+ if argument.idl_type.name == 'EventListener')
is_check_security_for_frame = (
- has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and
+ 'CheckSecurity' in interface.extended_attributes and
'DoNotCheckSecurity' not in extended_attributes)
is_raises_exception = 'RaisesException' in extended_attributes
@@ -129,7 +127,7 @@
method, CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES),
'has_event_listener_argument': has_event_listener_argument,
'has_exception_state':
- interface.name == 'EventTarget' or # FIXME: merge with is_check_security_for_frame http://crbug.com/383699
+ has_event_listener_argument or
is_raises_exception or
is_check_security_for_frame or
any(argument for argument in arguments
@@ -190,7 +188,7 @@
'has_default': 'Default' in extended_attributes or argument.default_value,
'has_event_listener_argument': any(
argument_so_far for argument_so_far in method.arguments[:index]
- if argument_so_far.idl_type.name == 'EventListenerOrNull'),
+ if argument_so_far.idl_type.name == 'EventListener'),
'has_type_checking_interface':
(has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or
has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and
@@ -224,7 +222,7 @@
def cpp_value(interface, method, number_of_arguments):
def cpp_argument(argument):
idl_type = argument.idl_type
- if idl_type.name == 'EventListenerOrNull':
+ if idl_type.name == 'EventListener':
if (interface.name == 'EventTarget' and
method.name == 'removeEventListener'):
# FIXME: remove this special case by moving get() into
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/scripts/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698