From 0d23294d42a312a84401f6d1b6dc1158d6f86d4d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sat, 12 Nov 2022 02:32:20 +0000 Subject: [PATCH] Remove promiseTest. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4033 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/task.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/task.c b/src/task.c index 2c553001..810d0a65 100644 --- a/src/task.c +++ b/src/task.c @@ -832,15 +832,6 @@ static JSValue _tf_task_getFile(JSContext* context, JSValueConst this_val, int a return result; } -static JSValue _tf_task_promiseTest(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv) -{ - tf_task_t* task = JS_GetContextOpaque(context); - promiseid_t promise_id = -1; - JSValue promise = tf_task_allocate_promise(task, &promise_id); - tf_task_resolve_promise(task, promise_id, argv[0]); - return promise; -} - const char* _tf_task_get_message_type(tf_task_message_t type) { switch (type) @@ -1587,7 +1578,6 @@ void tf_task_activate(tf_task_t* task) JS_SetPropertyStr(context, global, "exit", JS_NewCFunction(context, _tf_task_exit, "exit", 1)); JS_SetPropertyStr(context, global, "version", JS_NewCFunction(context, _tf_task_version, "version", 0)); JS_SetPropertyStr(context, global, "getFile", JS_NewCFunction(context, _tf_task_getFile, "getFile", 1)); - JS_SetPropertyStr(context, global, "promiseTest", JS_NewCFunction(context, _tf_task_promiseTest, "promiseTest", 1)); JS_FreeValue(context, global); }