mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
websocket: workaround of mSocketThread use-after-free when application is terminating
This commit is contained in:
parent
a907bc3c17
commit
3039da2cb2
1 changed files with 4 additions and 0 deletions
|
|
@ -2320,6 +2320,10 @@ WebSocketChannel::CleanupConnection()
|
|||
{
|
||||
LOG(("WebSocketChannel::CleanupConnection() %p", this));
|
||||
|
||||
if(!mSocketThread) { // freed elsewhere, give up here
|
||||
return;
|
||||
}
|
||||
|
||||
// This should run on the Socket Thread to prevent potential races.
|
||||
bool onSocketThread;
|
||||
nsresult rv = mSocketThread->IsOnCurrentThread(&onSocketThread);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue