diff --git a/jerry-core/ecma/base/ecma-helpers.c b/jerry-core/ecma/base/ecma-helpers.c index 90d42b34d..1f0d4e72d 100644 --- a/jerry-core/ecma/base/ecma-helpers.c +++ b/jerry-core/ecma/base/ecma-helpers.c @@ -1256,6 +1256,7 @@ ecma_create_error_reference (ecma_value_t value, /**< referenced value */ { ecma_error_reference_t *error_ref_p = (ecma_error_reference_t *) jmem_pools_alloc (sizeof (ecma_error_reference_t)); + JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_EXCEPTION; error_ref_p->refs_and_flags = ECMA_ERROR_REF_ONE | (is_exception ? 0 : ECMA_ERROR_REF_ABORT); error_ref_p->value = value; return ecma_make_error_reference_value (error_ref_p); diff --git a/tests/jerry/fail/regression-test-issue-3410.js b/tests/jerry/fail/regression-test-issue-3410.js new file mode 100644 index 000000000..b41575e53 --- /dev/null +++ b/tests/jerry/fail/regression-test-issue-3410.js @@ -0,0 +1,20 @@ +// Copyright JS Foundation and other contributors, http://js.foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +var a; +Promise.race([a]).then(function() { + [] = [] +}); +throw 0.1234;