diff --git a/netwerk/protocol/websocket/nsWebSocketConnection.cpp b/netwerk/protocol/websocket/nsWebSocketConnection.cpp index ca2125014591..bc628bcbdc0f 100644 --- a/netwerk/protocol/websocket/nsWebSocketConnection.cpp +++ b/netwerk/protocol/websocket/nsWebSocketConnection.cpp @@ -20,7 +20,13 @@ nsWebSocketConnection::nsWebSocketConnection( mSocketIn(aInputStream), mSocketOut(aOutputStream), mWriteOffset(0), - mStartReadingCalled(false) {} + mStartReadingCalled(false) { + LOG(("nsWebSocketConnection ctor %p\n", this)); +} + +nsWebSocketConnection::~nsWebSocketConnection() { + LOG(("nsWebSocketConnection dtor %p\n", this)); +} NS_IMETHODIMP nsWebSocketConnection::Init(nsIWebSocketConnectionListener* aListener, @@ -47,6 +53,7 @@ nsWebSocketConnection::Init(nsIWebSocketConnectionListener* aListener, NS_IMETHODIMP nsWebSocketConnection::Close() { + LOG(("nsWebSocketConnection::Close %p\n", this)); if (mTransport) { mTransport->SetSecurityCallbacks(nullptr); mTransport->SetEventSink(nullptr, nullptr); @@ -66,7 +73,6 @@ nsWebSocketConnection::Close() { mSocketOut = nullptr; } - mListener = nullptr; return NS_OK; } diff --git a/netwerk/protocol/websocket/nsWebSocketConnection.h b/netwerk/protocol/websocket/nsWebSocketConnection.h index 7b468293b801..1da1d2fa509a 100644 --- a/netwerk/protocol/websocket/nsWebSocketConnection.h +++ b/netwerk/protocol/websocket/nsWebSocketConnection.h @@ -37,7 +37,7 @@ class nsWebSocketConnection : public nsIWebSocketConnection, nsTArray&& aPayload); private: - virtual ~nsWebSocketConnection() = default; + virtual ~nsWebSocketConnection(); class OutputData { public: