From b37f8200b8cefe70affdc20acee27c8f01c60a8d Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Tue, 1 Oct 2019 20:14:26 +0300 Subject: [PATCH] Backed out changeset 7d1f6ed3ccf5 (bug 1577311) for build bustages at TypeUtils.cpp. CLOSED TREE --- dom/base/BodyStream.cpp | 10 +--------- dom/base/BodyStream.h | 2 -- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/dom/base/BodyStream.cpp b/dom/base/BodyStream.cpp index c81e29b53e76..c254e3f53dcd 100644 --- a/dom/base/BodyStream.cpp +++ b/dom/base/BodyStream.cpp @@ -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 stream = new BodyStream(aGlobal, aStreamHolder, aInputStream); - auto cleanup = MakeScopeExit([stream] { stream->Close(); }); - if (NS_IsMainThread()) { nsCOMPtr 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, diff --git a/dom/base/BodyStream.h b/dom/base/BodyStream.h index 491b3441a03e..f4eb09366f3c 100644 --- a/dom/base/BodyStream.h +++ b/dom/base/BodyStream.h @@ -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 mStreamCreated = false; }; class BodyStream final : public nsIInputStreamCallback,