Always fetch the promise JSValue and ID when we allocate one. Make it impossible that we've freed it before we return it. Hopefully fixes leaks. Definitely not worse for performance.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3758 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -56,7 +56,7 @@ tf_trace_t* tf_task_get_trace(tf_task_t* task);
|
||||
void tf_task_run_jobs(tf_task_t* task);
|
||||
const char* tf_task_get_name(tf_task_t* task);
|
||||
|
||||
promiseid_t tf_task_allocate_promise(tf_task_t* task);
|
||||
JSValue tf_task_allocate_promise(tf_task_t* task, promiseid_t* out_promise);
|
||||
void tf_task_reject_promise(tf_task_t* task, promiseid_t promise, JSValue error);
|
||||
void tf_task_resolve_promise(tf_task_t* task, promiseid_t promise, JSValue result);
|
||||
JSValue tf_task_get_promise(tf_task_t* task, promiseid_t promise);
|
||||
|
Reference in New Issue
Block a user