Bug 1267733 P1 Treat last-update-time as infinitely in the past when checking for service worker update after restart. r=jdm a=ritu
authorBen Kelly <ben@wanderview.com>
Fri, 29 Apr 2016 00:01:35 -0700
changeset 332630 4bfa10283a4ee1fec2afca0b892ffc1dfa1d5596
parent 332629 7c7a6fe3b94ba46ee2f7cdae684fe0030e3d3ea6
child 332631 67ab63244d1aba40a7fedfc9737249bc3571fa8d
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, ritu
bugs1267733
milestone48.0a2
Bug 1267733 P1 Treat last-update-time as infinitely in the past when checking for service worker update after restart. r=jdm a=ritu
dom/workers/ServiceWorkerRegistrationInfo.cpp
--- a/dom/workers/ServiceWorkerRegistrationInfo.cpp
+++ b/dom/workers/ServiceWorkerRegistrationInfo.cpp
@@ -255,18 +255,17 @@ ServiceWorkerRegistrationInfo::IsLastUpd
   // For testing.
   if (Preferences::GetBool("dom.serviceWorkers.testUpdateOverOneDay")) {
     return true;
   }
 
   const uint64_t kSecondsPerDay = 86400;
   const uint64_t now = PR_IntervalNow() / PR_MSEC_PER_SEC;
 
-  if ((mLastUpdateCheckTime != 0) &&
-      (now - mLastUpdateCheckTime > kSecondsPerDay)) {
+  if ((now - mLastUpdateCheckTime) > kSecondsPerDay) {
     return true;
   }
   return false;
 }
 
 void
 ServiceWorkerRegistrationInfo::NotifyListenersOnChange(WhichServiceWorker aChangedWorkers)
 {