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:
@@ -237,6 +237,8 @@ jerry_value_t jerry_parse_named_resource (const jerry_char_t *name_p, size_t nam
|
||||
jerry_value_t jerry_run (const jerry_value_t func_val);
|
||||
jerry_value_t jerry_eval (const jerry_char_t *source_p, size_t source_size, bool is_strict);
|
||||
|
||||
jerry_value_t jerry_run_all_enqueued_jobs (void);
|
||||
|
||||
/**
|
||||
* Get the global context.
|
||||
*/
|
||||
|
||||
@@ -126,31 +126,6 @@ bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p);
|
||||
*/
|
||||
double jerry_port_get_current_time (void);
|
||||
|
||||
/*
|
||||
* JobQueue Port API
|
||||
*/
|
||||
|
||||
/**
|
||||
* Jerry job handler function type
|
||||
*/
|
||||
typedef uint32_t (*jerry_job_handler_t) (void *);
|
||||
|
||||
/**
|
||||
* Enqueue a job described by a pair of function and data pointers. The port is
|
||||
* expected to call the handler function with the given data at some (later)
|
||||
* point of time.
|
||||
*
|
||||
* @param handler the pointer of the handler function associated with the job.
|
||||
* @param job_p the data pointer to be passed to handler when called.
|
||||
*
|
||||
* Note:
|
||||
* This port function is only called by the implementation of the Promise
|
||||
* builtin (mandated by the ES2015 standard). If the engine is built with
|
||||
* Promise disabled (e.g., with ES5.1 profile), then the port does not have
|
||||
* to implement this function.
|
||||
*/
|
||||
void jerry_port_jobqueue_enqueue (jerry_job_handler_t handler, void *job_p);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user