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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix template condition 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 e6bef2c0abf173263d7a3b64bd4d1c5b8638f09c..14aa6238ffd8c652a4b622fa631e41a2f3712ef1 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -88,10 +88,12 @@ def method_context(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
@@ -99,7 +101,7 @@ def method_context(interface, method):
includes.add('core/dom/custom/CustomElementCallbackDispatcher.h')
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
@@ -215,7 +217,7 @@ def argument_context(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
« 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