From e5160b9d2cbbae62c6ce7cd8aaa3fb3fb8d22006 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 25 May 2022 22:45:24 +0000 Subject: [PATCH] Remove stray "imports" cruft? git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3878 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/task.c | 2 +- src/taskstub.js.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/task.c b/src/task.c index 05cd9f48..460d880a 100644 --- a/src/task.c +++ b/src/task.c @@ -926,7 +926,7 @@ void tf_task_on_receive_packet(int packetType, const char* begin, size_t length, } js_free(to->_context, ptab); - JS_SetPropertyStr(to->_context, global, "imports", imports); + JS_FreeValue(to->_context, imports); JS_FreeValue(to->_context, global); } break; diff --git a/src/taskstub.js.c b/src/taskstub.js.c index 58c6cf6d..c0d67092 100644 --- a/src/taskstub.js.c +++ b/src/taskstub.js.c @@ -112,9 +112,7 @@ static JSValue _taskstub_create(JSContext* context, JSValueConst this_val, int a JS_SetPropertyStr(context, taskObject, "activate", JS_NewCFunction(context, _taskstub_activate, "activate", 0)); JS_SetPropertyStr(context, taskObject, "execute", JS_NewCFunction(context, _taskstub_execute, "execute", 1)); - JSAtom imports = JS_NewAtom(context, "imports"); JS_SetPropertyStr(context, taskObject, "setImports", JS_NewCFunction(context, _taskstub_setImports, "setImports", 1)); - JS_FreeAtom(context, imports); JS_SetPropertyStr(context, taskObject, "getExports", JS_NewCFunction(context, _taskstub_getExports, "getExports", 0)); JS_SetPropertyStr(context, taskObject, "setRequires", JS_NewCFunction(context, _taskstub_setRequires, "setRequires", 1)); JS_SetPropertyStr(context, taskObject, "kill", JS_NewCFunction(context, _taskstub_kill, "kill", 0));