From b2cbc7b654d51543d9b5e75f0397bdc8c8b5fc5b Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 16 Sep 2018 10:26:02 +0200 Subject: Stop using the worker MainThreadTaskQueue from dom/fetch. --- dom/fetch/FetchConsumer.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'dom/fetch/FetchConsumer.cpp') diff --git a/dom/fetch/FetchConsumer.cpp b/dom/fetch/FetchConsumer.cpp index 42dfcbaba..e82e5ec51 100644 --- a/dom/fetch/FetchConsumer.cpp +++ b/dom/fetch/FetchConsumer.cpp @@ -339,11 +339,7 @@ FetchBodyConsumer::Create(nsIGlobalObject* aGlobal, nsCOMPtr r = new BeginConsumeBodyRunnable(consumer); - if (workerPrivate) { - aRv = workerPrivate->DispatchToMainThread(r.forget()); - } else { - aRv = NS_DispatchToMainThread(r.forget()); - } + aRv = NS_DispatchToMainThread(r.forget()); if (NS_WARN_IF(aRv.Failed())) { return nullptr; @@ -655,9 +651,7 @@ FetchBodyConsumer::ShutDownMainThreadConsuming() nsCOMPtr r = NS_NewRunnableFunction( [self] () { self->ShutDownMainThreadConsuming(); }); - WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); - MOZ_ASSERT(workerPrivate); - workerPrivate->DispatchToMainThread(r.forget()); + MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(r.forget())); return; } -- cgit v1.2.3