зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1153929 - Add assertions and null checks to fix windows crash in nsHttpTransaction r=mcmanus
This commit is contained in:
Родитель
550cacb4e3
Коммит
b4379aa7b4
|
@ -728,6 +728,12 @@ nsHttpTransaction::WritePipeSegment(nsIOutputStream *stream,
|
|||
trans->SetResponseStart(TimeStamp::Now(), true);
|
||||
}
|
||||
|
||||
// Bug 1153929 - add checks to fix windows crash
|
||||
MOZ_ASSERT(trans->mWriter);
|
||||
if (!trans->mWriter) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
//
|
||||
// OK, now let the caller fill this segment with data.
|
||||
|
@ -768,6 +774,12 @@ nsHttpTransaction::WriteSegments(nsAHttpSegmentWriter *writer,
|
|||
|
||||
mWriter = writer;
|
||||
|
||||
// Bug 1153929 - add checks to fix windows crash
|
||||
MOZ_ASSERT(mPipeOut);
|
||||
if (!mPipeOut) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsresult rv = mPipeOut->WriteSegments(WritePipeSegment, this, count, countWritten);
|
||||
|
||||
mWriter = nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче