gecko-dev/dom/websocket
Kershaw Chang 61e150e7f9 Bug 1555322 - Make sure WebSocketImpl is deleted on the right thread r=smaug
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
2019-06-25 20:35:38 +00:00
..
tests Bug 1558822 - Fix more issues related to shadowing of variables in dom/ code. r=perry 2019-06-14 18:04:01 +00:00
moz.build Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
WebSocket.cpp Bug 1555322 - Make sure WebSocketImpl is deleted on the right thread r=smaug 2019-06-25 20:35:38 +00:00
WebSocket.h Bug 1539528 - WebSocket must bind itself to valid nsIGlobalObject in workers, r=smaug 2019-03-29 14:14:53 +00:00