Skip to content

Commit d2c523b

Browse files
authored
Use correct flag when checking for static snapshot in arguments object (#4343)
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
1 parent 7de7c21 commit d2c523b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jerry-core/ecma/operations/ecma-arguments-object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ ecma_op_create_arguments_object (vm_frame_ctx_shared_args_t *shared_p, /**< shar
112112
ECMA_SET_INTERNAL_VALUE_POINTER (mapped_arguments_p->u.byte_code, bytecode_data_p);
113113
}
114114

115-
if (!(bytecode_data_p->status_flags & ECMA_ARGUMENTS_OBJECT_STATIC_BYTECODE))
115+
/* Static snapshots are not ref counted. */
116+
if ((bytecode_data_p->status_flags & CBC_CODE_FLAGS_STATIC_FUNCTION) == 0)
116117
{
117118
ecma_bytecode_ref ((ecma_compiled_code_t *) bytecode_data_p);
118119
}

0 commit comments

Comments
 (0)