ios: Fix crashes transitioning between apps in one process mode.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 8m56s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 8m56s
This commit is contained in:
@@ -102,14 +102,13 @@ static void _tf_taskstub_on_exit(tf_taskstub_t* stub, int64_t status, int termin
|
||||
tf_packetstream_destroy(stub->_stream);
|
||||
stub->_stream = NULL;
|
||||
}
|
||||
tf_task_remove_child(stub->_owner, stub);
|
||||
if (stub->_process.data)
|
||||
{
|
||||
uv_close((uv_handle_t*)&stub->_process, _taskstub_on_handle_close);
|
||||
}
|
||||
else
|
||||
{
|
||||
_taskstub_cleanup(stub);
|
||||
tf_task_remove_child(stub->_owner, stub);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,9 +204,9 @@ static JSValue _taskstub_create(JSContext* context, JSValueConst this_val, int a
|
||||
}
|
||||
else
|
||||
{
|
||||
/* XXX: This is a leak. */
|
||||
uv_thread_t* thread = tf_malloc(sizeof(uv_thread_t));
|
||||
uv_thread_create(thread, _tf_taskstub_run_sandbox_thread, (void*)(intptr_t)fds[1]);
|
||||
uv_thread_t thread = 0;
|
||||
uv_thread_create(&thread, _tf_taskstub_run_sandbox_thread, (void*)(intptr_t)fds[1]);
|
||||
uv_thread_detach(&thread);
|
||||
}
|
||||
|
||||
tf_packetstream_set_on_receive(stub->_stream, tf_task_on_receive_packet, stub);
|
||||
|
||||
Reference in New Issue
Block a user