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

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

Issue 338893004: Extend ScalarValueString handling to include constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
Index: Source/bindings/scripts/v8_types.py
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
index 5f735af235cb5f6e211589cff8830bd9a92df915..b41e9cb020c1d7be7f1a7ceefa49264a6cccf44b 100644
--- a/Source/bindings/scripts/v8_types.py
+++ b/Source/bindings/scripts/v8_types.py
@@ -417,8 +417,7 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, index):
if 'EnforceRange' in extended_attributes:
arguments = ', '.join([v8_value, 'EnforceRange', 'exceptionState'])
- elif (idl_type.is_integer_type or # NormalConversion
- idl_type.name in ('ByteString', 'ScalarValueString')):
+ elif idl_type.may_raise_exception_on_conversion:
arguments = ', '.join([v8_value, 'exceptionState'])
else:
arguments = v8_value
@@ -466,8 +465,7 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
args = [variable_name, cpp_value]
if idl_type.base_type == 'DOMString' and not idl_type.array_or_sequence_type:
macro = 'TOSTRING_VOID'
- elif (idl_type.is_integer_type or
- idl_type.name in ('ByteString', 'ScalarValueString')):
+ elif idl_type.may_raise_exception_on_conversion:
macro = 'TONATIVE_VOID_EXCEPTIONSTATE'
args.append('exceptionState')
else:

Powered by Google App Engine
This is Rietveld 408576698