mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix cleanup in VM_OC_INITIALIZER_PUSH_PROP on abrupt completion (#4564)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
parent
9ca046b670
commit
feb2855f0c
@ -2544,7 +2544,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
case VM_OC_INITIALIZER_PUSH_PROP:
|
||||
{
|
||||
ecma_value_t *last_context_end_p = VM_LAST_CONTEXT_END ();
|
||||
right_value = last_context_end_p[-2];
|
||||
ecma_value_t base = last_context_end_p[-2];
|
||||
|
||||
if (opcode == CBC_EXT_INITIALIZER_PUSH_PROP)
|
||||
{
|
||||
@ -2557,7 +2557,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
stack_top_p--;
|
||||
}
|
||||
|
||||
result = vm_op_get_value (right_value, left_value);
|
||||
result = vm_op_get_value (base, left_value);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (result))
|
||||
{
|
||||
|
||||
@ -237,3 +237,14 @@ try {
|
||||
} catch (e) {
|
||||
assert (e instanceof SyntaxError);
|
||||
}
|
||||
|
||||
var abruptObj = Object.defineProperty({}, 'a', {
|
||||
get() { throw 5.2; }
|
||||
});
|
||||
|
||||
try {
|
||||
const { a } = abruptObj;
|
||||
assert (false);
|
||||
} catch (e) {
|
||||
assert (e === 5.2);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user