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

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

Issue 121113004: Improve handling of failed integer type conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 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/unstable/v8_attributes.py ('k') | Source/bindings/scripts/unstable/v8_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_methods.py
diff --git a/Source/bindings/scripts/unstable/v8_methods.py b/Source/bindings/scripts/unstable/v8_methods.py
index 08298cb195b41b80b93fdaee43b832e25731c5c2..d9e2d4282f56541548402dd9c281f5c8f9319f85 100644
--- a/Source/bindings/scripts/unstable/v8_methods.py
+++ b/Source/bindings/scripts/unstable/v8_methods.py
@@ -71,10 +71,6 @@ def generate_method(interface, method):
if is_custom_element_callbacks:
includes.add('core/dom/custom/CustomElementCallbackDispatcher.h')
- # Used for 'has_exception_state' (do we have an ExceptionState variable?)
- has_serialized_script_value_argument = any(
- argument for argument in arguments
- if argument.idl_type == 'SerializedScriptValue')
is_check_security_for_frame = (
'CheckSecurity' in interface.extended_attributes and
'DoNotCheckSecurity' not in extended_attributes)
@@ -95,10 +91,12 @@ def generate_method(interface, method):
'function_template': function_template(),
'idl_type': idl_type,
'has_exception_state':
- is_raises_exception or is_check_security_for_frame or
- has_serialized_script_value_argument or
+ is_raises_exception or
+ is_check_security_for_frame or
+ any(argument for argument in arguments
+ if argument.idl_type == 'SerializedScriptValue' or
+ v8_types.is_integer_type(argument.idl_type)) or
name in ['addEventListener', 'removeEventListener'],
- 'has_serialized_script_value_argument': has_serialized_script_value_argument,
'is_call_with_execution_context': has_extended_attribute_value(method, 'CallWith', 'ExecutionContext'),
'is_call_with_script_arguments': is_call_with_script_arguments,
'is_call_with_script_state': is_call_with_script_state,
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/scripts/unstable/v8_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698