summaryrefslogtreecommitdiff
path: root/dom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-16 10:26:02 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-16 10:32:01 +0200
commitb2cbc7b654d51543d9b5e75f0397bdc8c8b5fc5b (patch)
tree892e9384760f6e8eaae26894c7cd6145226b0186 /dom
parentad30b9265193219b7050092aefb3dabc18a38faa (diff)
downloaduxp-b2cbc7b654d51543d9b5e75f0397bdc8c8b5fc5b.tar.gz
Stop using the worker MainThreadTaskQueue from dom/fetch.
Diffstat (limited to 'dom')
-rw-r--r--dom/fetch/Fetch.cpp2
-rw-r--r--dom/fetch/FetchConsumer.cpp10
2 files changed, 3 insertions, 9 deletions
diff --git a/dom/fetch/Fetch.cpp b/dom/fetch/Fetch.cpp
index e2c1394263..f944352e3b 100644
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -260,7 +260,7 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
}
RefPtr<MainThreadFetchRunnable> run = new MainThreadFetchRunnable(resolver, r);
- worker->DispatchToMainThread(run.forget());
+ MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(run));
}
return p.forget();
diff --git a/dom/fetch/FetchConsumer.cpp b/dom/fetch/FetchConsumer.cpp
index 42dfcbaba9..e82e5ec517 100644
--- a/dom/fetch/FetchConsumer.cpp
+++ b/dom/fetch/FetchConsumer.cpp
@@ -339,11 +339,7 @@ FetchBodyConsumer<Derived>::Create(nsIGlobalObject* aGlobal,
nsCOMPtr<nsIRunnable> r = new BeginConsumeBodyRunnable<Derived>(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<Derived>::ShutDownMainThreadConsuming()
nsCOMPtr<nsIRunnable> r = NS_NewRunnableFunction(
[self] () { self->ShutDownMainThreadConsuming(); });
- WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
- MOZ_ASSERT(workerPrivate);
- workerPrivate->DispatchToMainThread(r.forget());
+ MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(r.forget()));
return;
}