зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 7d1f6ed3ccf5 (bug 1577311) for build bustages at TypeUtils.cpp. CLOSED TREE
This commit is contained in:
Родитель
9935b8c10c
Коммит
b37f8200b8
|
@ -48,7 +48,7 @@ void BodyStreamHolder::StoreBodyStream(BodyStream* aBodyStream) {
|
|||
}
|
||||
|
||||
void BodyStreamHolder::ForgetBodyStream() {
|
||||
MOZ_ASSERT_IF(mStreamCreated, mBodyStream);
|
||||
MOZ_ASSERT(mBodyStream);
|
||||
mBodyStream = nullptr;
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,6 @@ void BodyStream::Create(JSContext* aCx, BodyStreamHolder* aStreamHolder,
|
|||
RefPtr<BodyStream> stream =
|
||||
new BodyStream(aGlobal, aStreamHolder, aInputStream);
|
||||
|
||||
auto cleanup = MakeScopeExit([stream] { stream->Close(); });
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||
if (NS_WARN_IF(!os)) {
|
||||
|
@ -137,14 +135,8 @@ void BodyStream::Create(JSContext* aCx, BodyStreamHolder* aStreamHolder,
|
|||
// js object is finalized.
|
||||
NS_ADDREF(stream.get());
|
||||
|
||||
cleanup.release();
|
||||
|
||||
aStreamHolder->StoreBodyStream(stream);
|
||||
aStreamHolder->SetReadableStreamBody(body);
|
||||
|
||||
#ifdef DEBUG
|
||||
aStreamHolder->mStreamCreated = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void BodyStream::requestData(JSContext* aCx, JS::HandleObject aStream,
|
||||
|
|
|
@ -51,8 +51,6 @@ class BodyStreamHolder : public nsISupports {
|
|||
// Raw pointer because BodyStream keeps BodyStreamHolder alive and it
|
||||
// nullifies this stream before being released.
|
||||
BodyStream* mBodyStream;
|
||||
|
||||
DebugOnly<bool> mStreamCreated = false;
|
||||
};
|
||||
|
||||
class BodyStream final : public nsIInputStreamCallback,
|
||||
|
|
Загрузка…
Ссылка в новой задаче