mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 14:25:49 +00:00
Bug 1394564 - Delete current outgoing message when PrimeNewOutgoingMessage fails. r=mcmanus
--HG-- extra : amend_source : 6ac45c6b007dac89195529a2e57ccfbd7ca88b8f
This commit is contained in:
parent
3307231c00
commit
4e89b320f9
@ -2051,6 +2051,10 @@ WebSocketChannel::PrimeNewOutgoingMessage()
|
||||
if (!mCurrentOut)
|
||||
return;
|
||||
|
||||
auto cleanupAfterFailure = MakeScopeExit([&] {
|
||||
DeleteCurrentOutGoingMessage();
|
||||
});
|
||||
|
||||
WsMsgType msgType = mCurrentOut->GetMsgType();
|
||||
|
||||
LOG(("WebSocketChannel::PrimeNewOutgoingMessage "
|
||||
@ -2070,6 +2074,7 @@ WebSocketChannel::PrimeNewOutgoingMessage()
|
||||
if (mClientClosed) {
|
||||
DeleteCurrentOutGoingMessage();
|
||||
PrimeNewOutgoingMessage();
|
||||
cleanupAfterFailure.release();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2258,6 +2263,8 @@ WebSocketChannel::PrimeNewOutgoingMessage()
|
||||
// mCurrentOut->Length() bytes from mCurrentOut. The latter may be
|
||||
// coaleseced into the former for small messages or as the result of the
|
||||
// compression process.
|
||||
|
||||
cleanupAfterFailure.release();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user