mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +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));
|
LOG(("WebSocketChannel::CleanupConnection() %p", this));
|
||||||
|
|
||||||
|
if(!mSocketThread) { // freed elsewhere, give up here
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// This should run on the Socket Thread to prevent potential races.
|
// This should run on the Socket Thread to prevent potential races.
|
||||||
bool onSocketThread;
|
bool onSocketThread;
|
||||||
nsresult rv = mSocketThread->IsOnCurrentThread(&onSocketThread);
|
nsresult rv = mSocketThread->IsOnCurrentThread(&onSocketThread);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue