mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
Bug 1644009
- P5. Revert "Bug 1592488 - P6. Ensure an AbstractThread exists with RemoteWorkerService thread." r=nika
DirectTask dispatching will now be directly handled by nsThread. Differential Revision: https://phabricator.services.mozilla.com/D79089
This commit is contained in:
parent
8e4b7ba238
commit
e8113eee35
@ -11,7 +11,6 @@
|
||||
#include "mozilla/ipc/BackgroundParent.h"
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
#include "mozilla/ipc/PBackgroundParent.h"
|
||||
#include "mozilla/AbstractThread.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticMutex.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
@ -114,9 +113,6 @@ void RemoteWorkerService::InitializeOnTargetThread() {
|
||||
MOZ_ASSERT(mThread);
|
||||
MOZ_ASSERT(mThread->IsOnCurrentThread());
|
||||
|
||||
mAbstractThread = AbstractThread::CreateXPCOMThreadWrapper(
|
||||
mThread, false /* aRequireTailDispatch */);
|
||||
|
||||
PBackgroundChild* actorChild = BackgroundChild::GetOrCreateForCurrentThread();
|
||||
if (NS_WARN_IF(!actorChild)) {
|
||||
return;
|
||||
@ -146,7 +142,6 @@ void RemoteWorkerService::ShutdownOnTargetThread() {
|
||||
nsCOMPtr<nsIRunnable> r =
|
||||
NS_NewRunnableFunction("ShutdownOnMainThread", [self]() {
|
||||
self->mThread->Shutdown();
|
||||
self->mAbstractThread = nullptr;
|
||||
self->mThread = nullptr;
|
||||
});
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
class nsIThread;
|
||||
|
||||
namespace mozilla {
|
||||
class AbstractThread;
|
||||
namespace dom {
|
||||
|
||||
class RemoteWorkerServiceChild;
|
||||
@ -39,10 +38,6 @@ class RemoteWorkerService final : public nsIObserver {
|
||||
void ShutdownOnTargetThread();
|
||||
|
||||
nsCOMPtr<nsIThread> mThread;
|
||||
// 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<AbstractThread> mAbstractThread;
|
||||
RefPtr<RemoteWorkerServiceChild> mActor;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user