aboutsummaryrefslogtreecommitdiff
path: root/jerry-main
diff options
context:
space:
mode:
authorAkos Kiss <akiss@inf.u-szeged.hu>2017-05-18 11:30:50 +0200
committeryichoi <duddlf.choi@samsung.com>2017-05-18 18:30:50 +0900
commit23068bdf991b63d62c0564b0464e751da3929345 (patch)
treeb8c77a08cf12e80f3f9a216f04d88af86ea740e2 /jerry-main
parent0806c16902e458b637ed6e60b0e00d8f4e75d30a (diff)
Move the job queue from the ports into jerry-core (#1804)
* Move the job queue from the ports into jerry-core JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu * Remove port notification and keep `jerry_run_all_enqueued_jobs` API only JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
Diffstat (limited to 'jerry-main')
-rw-r--r--jerry-main/main-unix.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/jerry-main/main-unix.c b/jerry-main/main-unix.c
index de69173c..6cb4af8a 100644
--- a/jerry-main/main-unix.c
+++ b/jerry-main/main-unix.c
@@ -560,9 +560,6 @@ main (int argc,
is_repl_mode = true;
}
-#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
- jerry_port_default_jobqueue_init ();
-#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
jerry_init (flags);
register_js_function ("assert", jerryx_handler_assert);
@@ -728,15 +725,13 @@ main (int argc,
args,
1);
jerry_release_value (ret_val_print);
-#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
jerry_release_value (ret_val_eval);
- ret_val_eval = jerry_port_default_jobqueue_run ();
+ ret_val_eval = jerry_run_all_enqueued_jobs ();
if (jerry_value_has_error_flag (ret_val_eval))
{
print_unhandled_exception (ret_val_eval);
}
-#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
}
else
{
@@ -756,11 +751,10 @@ main (int argc,
ret_code = JERRY_STANDALONE_EXIT_CODE_FAIL;
}
-#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
else
{
jerry_release_value (ret_value);
- ret_value = jerry_port_default_jobqueue_run ();
+ ret_value = jerry_run_all_enqueued_jobs ();
if (jerry_value_has_error_flag (ret_value))
{
@@ -768,7 +762,6 @@ main (int argc,
ret_code = JERRY_STANDALONE_EXIT_CODE_FAIL;
}
}
-#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
jerry_release_value (ret_value);
jerry_cleanup ();