зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1232444 Only store service worker registrations after install is successful. r=baku
This commit is contained in:
Родитель
beda3fab62
Коммит
fcd1d099bd
|
@ -1182,6 +1182,7 @@ public:
|
|||
mRegistration->mWaitingWorker = mRegistration->mInstallingWorker.forget();
|
||||
mRegistration->mWaitingWorker->UpdateState(ServiceWorkerState::Installed);
|
||||
mRegistration->NotifyListenersOnChange();
|
||||
swm->StoreRegistration(mPrincipal, mRegistration);
|
||||
swm->InvalidateServiceWorkerRegistrationWorker(mRegistration,
|
||||
WhichServiceWorker::INSTALLING_WORKER | WhichServiceWorker::WAITING_WORKER);
|
||||
|
||||
|
@ -1261,7 +1262,6 @@ public:
|
|||
mRegistration->mPendingUninstall = false;
|
||||
RefPtr<ServiceWorkerInfo> newest = mRegistration->Newest();
|
||||
if (newest && mScriptSpec.Equals(newest->ScriptSpec())) {
|
||||
swm->StoreRegistration(mPrincipal, mRegistration);
|
||||
Succeed();
|
||||
|
||||
// Done() must always be called async from Start()
|
||||
|
@ -1277,8 +1277,6 @@ public:
|
|||
} else {
|
||||
mRegistration = swm->CreateNewRegistration(mScope, mPrincipal);
|
||||
}
|
||||
|
||||
swm->StoreRegistration(mPrincipal, mRegistration);
|
||||
} else {
|
||||
MOZ_ASSERT(mJobType == UpdateJob);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче