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
This commit is contained in:
@@ -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 ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user