| Index: Source/bindings/scripts/v8_types.py
|
| diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py
|
| index 6b76eadd2ed7dc13771662500cd2f0ec0926d251..653f80fb647b3bd3caac6b98afaa7b8a30ea998a 100644
|
| --- a/Source/bindings/scripts/v8_types.py
|
| +++ b/Source/bindings/scripts/v8_types.py
|
| @@ -594,7 +594,7 @@ def v8_value_to_cpp_value_array_or_sequence(native_array_element_type, v8_value,
|
|
|
|
|
| # FIXME: this function should be refactored, as this takes too many flags.
|
| -def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variable_name=None, index=None, declare_variable=True, isolate='info.GetIsolate()', used_in_private_script=False, return_promise=False, needs_exception_state_for_string=False, restricted_float=False):
|
| +def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variable_name=None, index=None, declare_variable=True, isolate='info.GetIsolate()', used_in_private_script=False, return_promise=False, needs_exception_state_for_string=False, restricted_float=False, no_throw=False):
|
| """Returns an expression that converts a V8 value to a C++ value and stores it as a local value."""
|
|
|
| this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes, raw_type=True)
|
| @@ -605,8 +605,13 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
|
|
|
| cpp_value = v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name, index, isolate, restricted_float=restricted_float)
|
|
|
| + if no_throw:
|
| + no_throw = '_NOTHROW'
|
| + else:
|
| + no_throw = ''
|
| +
|
| if idl_type.is_dictionary or idl_type.is_union_type:
|
| - return 'TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(%s, exceptionState)' % cpp_value
|
| + return 'TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL%s(%s, exceptionState)' % (no_throw, cpp_value)
|
|
|
| if idl_type.is_string_type or idl_type.v8_conversion_needs_exception_state:
|
| # Types that need error handling and use one of a group of (C++) macros
|
| @@ -640,6 +645,9 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl
|
| else:
|
| suffix += '_INTERNAL'
|
|
|
| + if macro != 'TOSTRING_VOID_EXCEPTIONSTATE':
|
| + suffix += no_throw
|
| +
|
| return '%s(%s)' % (macro + suffix, ', '.join(args))
|
|
|
| # Types that don't need error handling, and simply assign a value to the
|
|
|