Bug 1626728 - Normalize shutdown. r=perry,jstutte, a=RyanVM
authorAndrew Sutherland <asutherland@asutherland.org>
Thu, 01 Jan 1970 00:00:00 +0000
changeset 521930 6639deb894172375b05d6791f5f8c7d53ca79723
parent 521929 ecaceb8b82959de97b832ac4548f8dcd49796ef7
child 521956 f1252cfec7a1fec02d9579200d11f54479de18f6
push id37278
push userjcristau@mozilla.com
push dateFri, 03 Apr 2020 06:32:28 +0000
treeherdermozilla-central@6639deb89417 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperry, jstutte, RyanVM
bugs1626728
milestone76.0a1
first release with
nightly linux32
6639deb89417 / 76.0a1 / 20200403063228 / files
nightly linux64
6639deb89417 / 76.0a1 / 20200403063228 / files
nightly mac
6639deb89417 / 76.0a1 / 20200403063228 / files
nightly win32
6639deb89417 / 76.0a1 / 20200403063228 / files
nightly win64
6639deb89417 / 76.0a1 / 20200403063228 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1626728 - Normalize shutdown. r=perry,jstutte, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D69463
dom/cache/StreamList.cpp
--- a/dom/cache/StreamList.cpp
+++ b/dom/cache/StreamList.cpp
@@ -128,17 +128,25 @@ void StreamList::Close(const nsID& aId) 
   if (mStreamControl) {
     mStreamControl->Close(aId);
   }
 }
 
 void StreamList::CloseAll() {
   NS_ASSERT_OWNINGTHREAD(StreamList);
   if (mStreamControl) {
-    mStreamControl->CloseAll();
+    auto streamControl = mStreamControl;
+    mStreamControl = nullptr;
+
+    streamControl->CloseAll();
+
+    mStreamControl = streamControl;
+    streamControl = nullptr;
+
+    mStreamControl->Shutdown();
   }
 }
 
 void StreamList::Cancel() {
   NS_ASSERT_OWNINGTHREAD(StreamList);
   CloseAll();
 }