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:
Zidong Jiang
2016-07-19 15:30:00 +08:00
parent dd3f801ae0
commit ca39875690
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -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);