Bug 1381311 - change main thread check to STS thread check. r?mayhemer draft
authorShih-Chiang Chien <schien@mozilla.com>
Mon, 17 Jul 2017 09:51:54 +0800
changeset 609595 8229fd689a61087cb8740d56df596119b85bf744
parent 608658 67cd1ee26f2661fa5efe3d952485ab3c89af4271
child 637583 9105b82350ed9bba050823f7e3e1018e8790916a
push id68592
push userschien@mozilla.com
push dateMon, 17 Jul 2017 01:52:28 +0000
reviewersmayhemer
bugs1381311, 1338493
milestone56.0a1
Bug 1381311 - change main thread check to STS thread check. r?mayhemer In Bug 1338493 I moved the operation thread of HttpBackgroundChannelChild from main thread to STS thread. All the thread assertion shoudl be updated. MozReview-Commit-ID: 307jBR48aYc
netwerk/protocol/http/HttpBackgroundChannelChild.cpp
--- a/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
+++ b/netwerk/protocol/http/HttpBackgroundChannelChild.cpp
@@ -447,17 +447,17 @@ HttpBackgroundChannelChild::ActorDestroy
   // If background channel is not closed by normal IPDL actor deletion,
   // remove the HttpChannelChild reference and notify background channel
   // destroyed immediately.
   if (aWhy == Deletion && !mQueuedRunnables.IsEmpty()) {
     LOG(("  > pending until queued messages are flushed\n"));
     RefPtr<HttpBackgroundChannelChild> self = this;
     mQueuedRunnables.AppendElement(NS_NewRunnableFunction(
       "HttpBackgroundChannelChild::ActorDestroy", [self]() {
-        MOZ_ASSERT(NS_IsMainThread());
+        MOZ_ASSERT(OnSocketThread());
         RefPtr<HttpChannelChild> channelChild = self->mChannelChild.forget();
 
         if (channelChild) {
           channelChild->OnBackgroundChildDestroyed(self);
         }
       }));
     return;
   }