Multiple test fixes.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3874 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -258,9 +258,22 @@ static void _taskstub_cleanup(tf_taskstub_t* stub)
|
||||
static void _taskstub_finalizer(JSRuntime* runtime, JSValue value)
|
||||
{
|
||||
tf_taskstub_t* stub = JS_GetOpaque(value, _classId);
|
||||
stub->_on_exit = JS_UNDEFINED;
|
||||
stub->_on_error = JS_UNDEFINED;
|
||||
stub->_on_print = JS_UNDEFINED;
|
||||
JSContext* context = tf_task_get_context(stub->_owner);
|
||||
if (!JS_IsUndefined(stub->_on_exit))
|
||||
{
|
||||
JS_FreeValue(context, stub->_on_exit);
|
||||
stub->_on_exit = JS_UNDEFINED;
|
||||
}
|
||||
if (!JS_IsUndefined(stub->_on_error))
|
||||
{
|
||||
JS_FreeValue(context, stub->_on_error);
|
||||
stub->_on_error = JS_UNDEFINED;
|
||||
}
|
||||
if (!JS_IsUndefined(stub->_on_print))
|
||||
{
|
||||
JS_FreeValue(context, stub->_on_print);
|
||||
stub->_on_print = JS_UNDEFINED;
|
||||
}
|
||||
tf_packetstream_destroy(stub->_stream);
|
||||
stub->_stream = NULL;
|
||||
stub->_finalized = true;
|
||||
|
Reference in New Issue
Block a user