From d3f369570f9e4970366cc25a8f022f7d13574438 Mon Sep 17 00:00:00 2001 From: Jean-Yves Avenard Date: Fri, 12 Jun 2020 05:09:40 +0000 Subject: [PATCH] Bug 1644009 - P3. Revert "Bug 1592488 - P8. Ensure AbstractThread exists with STS thread." r=valentin,necko-reviewers DirectTask dispatching will now be directly handled by nsThread. Differential Revision: https://phabricator.services.mozilla.com/D79087 --- netwerk/base/nsSocketTransportService2.cpp | 4 ---- netwerk/base/nsSocketTransportService2.h | 5 ----- 2 files changed, 9 deletions(-) diff --git a/netwerk/base/nsSocketTransportService2.cpp b/netwerk/base/nsSocketTransportService2.cpp index b37f415ce4e1..354bd0fdc724 100644 --- a/netwerk/base/nsSocketTransportService2.cpp +++ b/netwerk/base/nsSocketTransportService2.cpp @@ -15,7 +15,6 @@ #include "prerror.h" #include "nsServiceManagerUtils.h" #include "nsIObserverService.h" -#include "mozilla/AbstractThread.h" #include "mozilla/Atomics.h" #include "mozilla/Services.h" #include "mozilla/Likely.h" @@ -794,7 +793,6 @@ nsresult nsSocketTransportService::ShutdownThread() { MutexAutoLock lock(mLock); // Drop our reference to mThread and make sure that any concurrent // readers are excluded - mAbstractThread = nullptr; mThread = nullptr; } @@ -1044,8 +1042,6 @@ nsSocketTransportService::Run() { } mRawThread = NS_GetCurrentThread(); - mAbstractThread = AbstractThread::CreateXPCOMThreadWrapper( - mRawThread, false /* require taildispatch */); // hook ourselves up to observe event processing for this thread nsCOMPtr threadInt = do_QueryInterface(mRawThread); diff --git a/netwerk/base/nsSocketTransportService2.h b/netwerk/base/nsSocketTransportService2.h index bc20403bc93d..b2ad4da3dd04 100644 --- a/netwerk/base/nsSocketTransportService2.h +++ b/netwerk/base/nsSocketTransportService2.h @@ -32,7 +32,6 @@ class nsIPrefBranch; //----------------------------------------------------------------------------- namespace mozilla { -class AbstractThread; namespace net { // @@ -144,10 +143,6 @@ class nsSocketTransportService final : public nsPISocketTransportService, //------------------------------------------------------------------------- nsCOMPtr mThread; // protected by mLock - // We create an AbstractThread for mThread thread so that we can use direct - // task dispatching with MozPromise, which is similar (but not identical to) - // the microtask semantics of JS promises. - RefPtr mAbstractThread; UniquePtr mPollableEvent; // Returns mThread, protecting the get-and-addref with mLock