Remove stray "imports" cruft?

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3878 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-05-25 22:45:24 +00:00
parent e8fb73fdf9
commit e5160b9d2c
2 changed files with 1 additions and 3 deletions

View File

@ -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;

View File

@ -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));