Bug 1157627 - about:serviceworkers should show new registered ServiceWorkers. r=nsm
authorAndrea Marchesini <amarchesini@mozilla.com>
Thu, 30 Apr 2015 15:32:47 +0100
changeset 273458 2db8c3341c29a9afc823445b34cbe9a68579211c
parent 273457 4d5f30e402daa0abb63e0714e439ce1c89c68ff5
child 273459 d2736b5af22677cd0a21f8d3449f7c5851859621
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnsm
bugs1157627
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1157627 - about:serviceworkers should show new registered ServiceWorkers. r=nsm
dom/workers/ServiceWorkerManager.cpp
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -576,16 +576,17 @@ public:
     if (mJobType == REGISTER_JOB) {
       mRegistration = swm->GetRegistration(mScope);
 
       if (mRegistration) {
         nsRefPtr<ServiceWorkerInfo> newest = mRegistration->Newest();
         if (newest && mScriptSpec.Equals(newest->ScriptSpec()) &&
             mScriptSpec.Equals(mRegistration->mScriptSpec)) {
           mRegistration->mPendingUninstall = false;
+          swm->StoreRegistration(mPrincipal, mRegistration);
           Succeed();
           Done(NS_OK);
           return;
         }
       } else {
         mRegistration = swm->CreateNewRegistration(mScope, mPrincipal);
       }