From d2c523b2c024489aeb6593ed725a175a9a116a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=A1l?= Date: Thu, 19 Nov 2020 11:23:44 +0100 Subject: [PATCH] Use correct flag when checking for static snapshot in arguments object (#4343) JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com --- jerry-core/ecma/operations/ecma-arguments-object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jerry-core/ecma/operations/ecma-arguments-object.c b/jerry-core/ecma/operations/ecma-arguments-object.c index db7c48233..aefc97188 100644 --- a/jerry-core/ecma/operations/ecma-arguments-object.c +++ b/jerry-core/ecma/operations/ecma-arguments-object.c @@ -112,7 +112,8 @@ ecma_op_create_arguments_object (vm_frame_ctx_shared_args_t *shared_p, /**< shar ECMA_SET_INTERNAL_VALUE_POINTER (mapped_arguments_p->u.byte_code, bytecode_data_p); } - if (!(bytecode_data_p->status_flags & ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE)) + /* Static snapshots are not ref counted. */ + if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION) == 0) { ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_data_p); }