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

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

Issue 338893004: Extend ScalarValueString handling to include constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Common up more string-related type checks 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
Index: Source/bindings/scripts/v8_methods.py
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
index 11486410b0fdec1d800890519d5f5791f8587455..a710189cb054ce6a971bd7b84114b88b9bfa5f39 100644
--- a/Source/bindings/scripts/v8_methods.py
+++ b/Source/bindings/scripts/v8_methods.py
@@ -131,10 +131,8 @@ def generate_method(interface, method):
is_raises_exception or
is_check_security_for_frame or
any(argument for argument in arguments
- if argument.idl_type.name in ('ByteString',
- 'ScalarValueString',
- 'SerializedScriptValue') or
- argument.idl_type.is_integer_type),
+ if argument.idl_type.name == 'SerializedScriptValue' or
+ argument.idl_type.may_raise_exception_on_conversion),
'idl_type': idl_type.base_type,
'is_call_with_execution_context': has_extended_attribute_value(method, 'CallWith', 'ExecutionContext'),
'is_call_with_script_arguments': is_call_with_script_arguments,
@@ -313,7 +311,7 @@ def v8_value_to_local_cpp_value(argument, index):
# FIXME: This special way of handling string arguments with null defaults
# can go away once we fully support default values.
if (argument.is_optional and
- idl_type.name in ('String', 'ByteString', 'ScalarValueString') and
+ (idl_type.is_string_type or idl_type.name == 'StringOrNull') and
Jens Widell 2014/06/20 08:07:06 Isn't 'is_string_type' true for StringOrNull?
sof 2014/06/20 08:15:10 The RHS of the disjunction doesn't add anything, r
argument.default_value and argument.default_value.is_null):
v8_value = 'argumentOrNull(info, %s)' % index
else:

Powered by Google App Engine
This is Rietveld 408576698