fix bug of "deref bytecode twice" in jerry_exec_snapshot
Enable the snapshot related test code in test-api.c JerryScript-DCO-1.0-Signed-off-by: Zidong Jiang zidong.jiang@intel.com
This commit is contained in:
+1
-1
@@ -2266,13 +2266,13 @@ jerry_exec_snapshot (const void *snapshot_p, /**< snapshot */
|
||||
if (header_p->is_run_global)
|
||||
{
|
||||
ret_val = vm_run_global (bytecode_p);
|
||||
ecma_bytecode_deref (bytecode_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret_val = vm_run_eval (bytecode_p, false);
|
||||
}
|
||||
|
||||
ecma_bytecode_deref (bytecode_p);
|
||||
return ret_val;
|
||||
#else /* !JERRY_ENABLE_SNAPSHOT_EXEC */
|
||||
JERRY_UNUSED (snapshot_p);
|
||||
|
||||
Reference in New Issue
Block a user