Backed out changeset 7d1f6ed3ccf5 (bug 1577311) for build bustages at TypeUtils.cpp. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Tue, 01 Oct 2019 20:14:26 +0300
changeset 495817 9ffde0fb448b092c0b931610ee26d26e0ddb30a7
parent 495816 4fbb6d14488034abc1bf7675a30dbbc14f6c004a
child 495818 b9c0a2c4fff9ac4ddab644025c0e9b415a693b27
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1577311
milestone71.0a1
backs out7d1f6ed3ccf56db2f558bd8aaf352543122e09a2
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 7d1f6ed3ccf5 (bug 1577311) for build bustages at TypeUtils.cpp. CLOSED TREE
dom/base/BodyStream.cpp
dom/base/BodyStream.h
--- a/dom/base/BodyStream.cpp
+++ b/dom/base/BodyStream.cpp
@@ -43,17 +43,17 @@ BodyStreamHolder::BodyStreamHolder() : m
 
 void BodyStreamHolder::StoreBodyStream(BodyStream* aBodyStream) {
   MOZ_ASSERT(aBodyStream);
   MOZ_ASSERT(!mBodyStream);
   mBodyStream = aBodyStream;
 }
 
 void BodyStreamHolder::ForgetBodyStream() {
-  MOZ_ASSERT_IF(mStreamCreated, mBodyStream);
+  MOZ_ASSERT(mBodyStream);
   mBodyStream = nullptr;
 }
 
 // BodyStream
 // ---------------------------------------------------------------------------
 
 class BodyStream::WorkerShutdown final : public WorkerControlRunnable {
  public:
@@ -87,18 +87,16 @@ void BodyStream::Create(JSContext* aCx, 
                         ErrorResult& aRv) {
   MOZ_DIAGNOSTIC_ASSERT(aCx);
   MOZ_DIAGNOSTIC_ASSERT(aStreamHolder);
   MOZ_DIAGNOSTIC_ASSERT(aInputStream);
 
   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)) {
       aRv.Throw(NS_ERROR_FAILURE);
       return;
     }
 
     aRv = os->AddObserver(stream, DOM_WINDOW_DESTROYED_TOPIC, true);
@@ -132,24 +130,18 @@ void BodyStream::Create(JSContext* aCx, 
     return;
   }
 
   // This will be released in BodyStream::FinalizeCallback().  We are
   // guaranteed the jsapi will call FinalizeCallback when ReadableStream
   // 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,
                              size_t aDesiredSize) {
 #if MOZ_DIAGNOSTIC_ASSERT_ENABLED
   bool disturbed;
   if (!JS::ReadableStreamIsDisturbed(aCx, aStream, &disturbed)) {
     JS_ClearPendingException(aCx);
--- a/dom/base/BodyStream.h
+++ b/dom/base/BodyStream.h
@@ -46,18 +46,16 @@ class BodyStreamHolder : public nsISuppo
 
  private:
   void StoreBodyStream(BodyStream* aBodyStream);
   void ForgetBodyStream();
 
   // 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,
                          public nsIObserver,
                          public nsSupportsWeakReference,
                          private JS::ReadableStreamUnderlyingSource {
   friend class BodyStreamHolder;