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: |