mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix sweeping ecma_promise_value_thunk function objects (#4312)
Fixes #4214 JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
parent
72c92d6b36
commit
e681adce05
@ -1319,6 +1319,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THUNK:
|
||||
case ECMA_NATIVE_HANDLER_VALUE_THROWER:
|
||||
{
|
||||
ecma_free_value_if_not_object (((ecma_promise_value_thunk_t *) object_p)->value);
|
||||
ext_object_size = sizeof (ecma_promise_value_thunk_t);
|
||||
break;
|
||||
}
|
||||
|
||||
19
tests/jerry/es.next/regression-test-issue-4214.js
Normal file
19
tests/jerry/es.next/regression-test-issue-4214.js
Normal file
@ -0,0 +1,19 @@
|
||||
// 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 called = false; Promise.resolve('d').finally((v) => called = true);
|
||||
|
||||
function __checkAsync() {
|
||||
assert(called);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user