Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index 839d68fc445d684380c262c06772eb590826ad18..3994db6353ee03ceafe805ea8d58421c85487fff 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -570,10 +570,12 @@ 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, index, isolate) |
args = [variable_name, cpp_value] |
if idl_type.base_type == 'DOMString': |
- macro = 'TOSTRING_DEFAULT' if used_in_private_script else 'TOSTRING_VOID' |
+ if return_promise: |
+ macro = 'TOSTRING_VOID_EXCEPTIONSTATE' |
+ else: |
+ macro = 'TOSTRING_DEFAULT' if used_in_private_script else 'TOSTRING_VOID' |
elif idl_type.v8_conversion_needs_exception_state: |
macro = 'TONATIVE_DEFAULT_EXCEPTIONSTATE' if used_in_private_script else 'TONATIVE_VOID_EXCEPTIONSTATE' |
- args.append('exceptionState') |
elif idl_type.v8_conversion_is_trivial: |
assignment = '%s = %s' % (variable_name, cpp_value) |
if declare_variable: |
@@ -582,6 +584,9 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl |
else: |
macro = 'TONATIVE_DEFAULT' if used_in_private_script else 'TONATIVE_VOID' |
+ if macro.endswith('_EXCEPTIONSTATE'): |
+ args.append('exceptionState') |
+ |
if used_in_private_script: |
args.append('false') |
@@ -592,7 +597,7 @@ def v8_value_to_local_cpp_value(idl_type, extended_attributes, v8_value, variabl |
if return_promise: |
suffix += '_PROMISE' |
args.append('info') |
- if macro == 'TONATIVE_VOID_EXCEPTIONSTATE': |
+ if macro.endswith('_EXCEPTIONSTATE'): |
args.append('ScriptState::current(%s)' % isolate) |
if declare_variable: |