forked from mirrors/gecko-dev
I think the root cause of the crash is that WebSocketImpl is not deleted on the target thread. When this happens, there is a race between setting WebSocket::mImpl to nullptr and accessubg mImpl. If WebSocketImpl is always deleted on the target thread, WebSocketImpl::Disconnect should be called in ~WebSocketImpl when mDisconnectingOrDisconnected is false. So, this patch checks the ref counter in WebSocketImpl::Release and make sure to delete WebSocketImpl on the right thread. Differential Revision: https://phabricator.services.mozilla.com/D34320 --HG-- extra : moz-landing-system : lando |
||
|---|---|---|
| .. | ||
| tests | ||
| moz.build | ||
| WebSocket.cpp | ||
| WebSocket.h | ||