mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1323425 - WebSocket::CreateAndDispatchCloseEvent must check if mImpl has been nullified, r=smaug
This commit is contained in:
parent
91b032beba
commit
250fc8ec0c
@ -2022,10 +2022,11 @@ WebSocket::CreateAndDispatchCloseEvent(bool aWasClean,
|
||||
uint16_t aCode,
|
||||
const nsAString& aReason)
|
||||
{
|
||||
MOZ_ASSERT(mImpl);
|
||||
AssertIsOnTargetThread();
|
||||
|
||||
if (mImpl->mChannel) {
|
||||
// This method is called by a runnable and it can happen that, in the
|
||||
// meantime, GC unlinked this object, so mImpl could be null.
|
||||
if (mImpl && mImpl->mChannel) {
|
||||
mImpl->mService->WebSocketClosed(mImpl->mChannel->Serial(),
|
||||
mImpl->mInnerWindowID,
|
||||
aWasClean, aCode, aReason);
|
||||
|
Loading…
Reference in New Issue
Block a user