Bug 1606901 - P2. Abort should we failed at creating IPCStreamSource. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D61367

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jean-Yves Avenard 2020-02-04 21:58:50 +00:00
Родитель ea6b9ad701
Коммит 887d964fff
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -114,11 +114,16 @@ void SerializeInputStreamAsPipeInternal(nsIInputStream* aInputStream,
return; return;
} }
} }
MOZ_DIAGNOSTIC_ASSERT(asyncStream); MOZ_DIAGNOSTIC_ASSERT(asyncStream);
aParams = IPCRemoteStreamParams( auto* streamSource = IPCStreamSource::Create(asyncStream, aManager);
aDelayedStart, IPCStreamSource::Create(asyncStream, aManager), length); if (NS_WARN_IF(!streamSource)) {
// Failed to create IPCStreamSource, which would cause a failure should we
// attempt to serialize it later. So abort now.
return;
}
aParams = IPCRemoteStreamParams(aDelayedStart, streamSource, length);
} }
} // namespace } // namespace