Bug 1365504 - Remove the call to AbstractThread::GetCurrent() in ServiceWorkerUpdaterChild.cpp. r?bkelly
See
bug 1365483 for the rationale.
MozReview-Commit-ID: BDbdiWT2ZFa
--- a/dom/workers/ServiceWorkerUpdaterChild.cpp
+++ b/dom/workers/ServiceWorkerUpdaterChild.cpp
@@ -11,21 +11,24 @@ namespace dom {
namespace workers {
ServiceWorkerUpdaterChild::ServiceWorkerUpdaterChild(GenericPromise* aPromise,
CancelableRunnable* aSuccessRunnable,
CancelableRunnable* aFailureRunnable)
: mSuccessRunnable(aSuccessRunnable)
, mFailureRunnable(aFailureRunnable)
{
+ // TODO: remove the main thread restriction after fixing bug 1364821.
+ MOZ_ASSERT(NS_IsMainThread());
+
MOZ_ASSERT(aPromise);
MOZ_ASSERT(aSuccessRunnable);
MOZ_ASSERT(aFailureRunnable);
- aPromise->Then(AbstractThread::GetCurrent(), __func__,
+ aPromise->Then(AbstractThread::MainThread(), __func__,
[this]() {
mPromiseHolder.Complete();
Unused << Send__delete__(this);
}).Track(mPromiseHolder);
}
mozilla::ipc::IPCResult
ServiceWorkerUpdaterChild::RecvProceed(const bool& aAllowed)