зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1300658 P4 Make dom/fetch use the worker MainThreadTaskQueue. r=baku
This commit is contained in:
Родитель
adf0d2b529
Коммит
c26c5533f0
|
@ -265,7 +265,7 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
|
|||
}
|
||||
|
||||
RefPtr<MainThreadFetchRunnable> run = new MainThreadFetchRunnable(resolver, r);
|
||||
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(run));
|
||||
worker->DispatchToMainThread(run.forget());
|
||||
}
|
||||
|
||||
return p.forget();
|
||||
|
@ -1032,7 +1032,12 @@ FetchBody<Derived>::BeginConsumeBody()
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> r = new BeginConsumeBodyRunnable<Derived>(this);
|
||||
nsresult rv = NS_DispatchToMainThread(r);
|
||||
nsresult rv = NS_OK;
|
||||
if (mWorkerPrivate) {
|
||||
rv = mWorkerPrivate->DispatchToMainThread(r.forget());
|
||||
} else {
|
||||
rv = NS_DispatchToMainThread(r.forget());
|
||||
}
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
ReleaseObject();
|
||||
return rv;
|
||||
|
|
Загрузка…
Ссылка в новой задаче