diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index d938bbcfd5b..55833d65da8 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -2461,6 +2461,10 @@ private: { AssertIsOnMainThread(); + if (mCanceled) { + return mCallback ? mCallback->UnregisterSucceeded(false) : NS_OK; + } + PrincipalInfo principalInfo; if (NS_WARN_IF(NS_FAILED(PrincipalToPrincipalInfo(mPrincipal, &principalInfo)))) {