зеркало из https://github.com/mozilla/gecko-dev.git
Fix crash if the channel gets canceled too early. Bug 390938, r+sr=biesi
This commit is contained in:
Родитель
679c0f8726
Коммит
6e5bc45402
|
@ -156,6 +156,14 @@ nsGopherContentStream::OnInputStreamReady(nsIAsyncInputStream *stream)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsGopherContentStream::OnOutputStreamReady(nsIAsyncOutputStream *stream)
|
nsGopherContentStream::OnOutputStreamReady(nsIAsyncOutputStream *stream)
|
||||||
{
|
{
|
||||||
|
// If we're already closed, mSocketOutput is going to be null and we'll
|
||||||
|
// just be getting notified that it got closed (by outselves). In that
|
||||||
|
// case, nothing to do here.
|
||||||
|
if (!mSocketOutput) {
|
||||||
|
NS_ASSERTION(NS_FAILED(Status()), "How did that happen?");
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
// We have to close ourselves if we hit an error here in order to propagate
|
// We have to close ourselves if we hit an error here in order to propagate
|
||||||
// the error to our consumer. Otherwise, just forward the notification so
|
// the error to our consumer. Otherwise, just forward the notification so
|
||||||
// that the consumer will know to start reading.
|
// that the consumer will know to start reading.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче