зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1653642 - Don't release WebSocketChannel in nsWebSocketConnection::Close, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D84127
This commit is contained in:
Родитель
2bbf09f2c9
Коммит
a7be99f849
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class nsWebSocketConnection : public nsIWebSocketConnection,
|
|||
nsTArray<uint8_t>&& aPayload);
|
||||
|
||||
private:
|
||||
virtual ~nsWebSocketConnection() = default;
|
||||
virtual ~nsWebSocketConnection();
|
||||
|
||||
class OutputData {
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче