| Index: Source/bindings/templates/methods.cpp
|
| diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
|
| index ed6fb0da6764dcdab0b2a0223d1d869c2e145627..31e9780c90bc961c12b06d6c151346079799f2f0 100644
|
| --- a/Source/bindings/templates/methods.cpp
|
| +++ b/Source/bindings/templates/methods.cpp
|
| @@ -238,7 +238,7 @@ if (!{{method.cpp_value}})
|
| {{cpp_value}};
|
| {% elif method.is_constructor %}
|
| {{method.cpp_type}} impl = {{cpp_value}};
|
| -{% elif method.use_local_result and not method.union_arguments %}
|
| +{% elif method.use_local_result %}
|
| {{method.cpp_type}} result = {{cpp_value}};
|
| {% endif %}
|
| {# Post-call #}
|
| @@ -251,8 +251,6 @@ if (exceptionState.hadException()) {
|
| {# Set return value #}
|
| {% if method.is_constructor %}
|
| {{generate_constructor_wrapper(method)}}
|
| -{%- elif method.union_arguments %}
|
| -{{union_type_method_call_and_set_return_value(method)}}
|
| {%- elif v8_set_return_value %}
|
| {% if method.is_explicit_nullable %}
|
| if (result.isNull())
|
| @@ -278,31 +276,6 @@ if (info.Length() >= {{argument_index}} + 1 && listener && !impl->toNode())
|
|
|
|
|
| {######################################}
|
| -{% macro union_type_method_call_and_set_return_value(method) %}
|
| -{% for argument in method.union_arguments %}
|
| -{{argument.cpp_type}} {{argument.cpp_value}}{{argument.cpp_type_initializer}};
|
| -{% endfor %}
|
| -{{method.cpp_value}};
|
| -{% if method.is_null_expression %}{# used by getters #}
|
| -if ({{method.is_null_expression}})
|
| - return;
|
| -{% endif %}
|
| -{% for argument in method.union_arguments %}
|
| -if ({{argument.null_check_value}}) {
|
| - {{argument.v8_set_return_value}};
|
| - return;
|
| -}
|
| -{% endfor %}
|
| -{# Fall back to null if none of the union members results are returned #}
|
| -{% if method.is_null_expression %}
|
| -ASSERT_NOT_REACHED();
|
| -{% else %}
|
| -v8SetReturnValueNull(info);
|
| -{% endif %}
|
| -{% endmacro %}
|
| -
|
| -
|
| -{######################################}
|
| {% macro throw_type_error(method, error_message) %}
|
| {% if method.has_exception_state %}
|
| exceptionState.throwTypeError({{error_message}});
|
|
|