Title: [227854] branches/safari-605-branch/Source/WebCore
- Revision
- 227854
- Author
- [email protected]
- Date
- 2018-01-30 14:14:14 -0800 (Tue, 30 Jan 2018)
Log Message
Cherry-pick r227796. rdar://problem/37037868
Modified Paths
Diff
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (227853 => 227854)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-30 22:14:12 UTC (rev 227853)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-30 22:14:14 UTC (rev 227854)
@@ -1,5 +1,29 @@
2018-01-30 Jason Marcell <[email protected]>
+ Cherry-pick r227796. rdar://problem/37037868
+
+ 2018-01-30 Chris Dumez <[email protected]>
+
+ Service worker registration soft updates happen too frequently
+ https://bugs.webkit.org/show_bug.cgi?id=182296
+ <rdar://problem/37031862>
+
+ Reviewed by Youenn Fablet.
+
+ Move code that updates the registration's last update check time from after
+ the script bytecheck to before, as per:
+ - https://w3c.github.io/ServiceWorker/#update (step 7.19)
+
+ This way, the last update check time gets updated even if the newly fetched
+ script is identical to the previous one, which is the common case.
+
+ * workers/service/server/SWServer.cpp:
+ (WebCore::SWServer::updateWorker):
+ * workers/service/server/SWServerJobQueue.cpp:
+ (WebCore::SWServerJobQueue::scriptFetchFinished):
+
+2018-01-30 Jason Marcell <[email protected]>
+
Cherry-pick r227789. rdar://problem/37035797
2018-01-30 Chris Dumez <[email protected]>
Modified: branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp (227853 => 227854)
--- branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp 2018-01-30 22:14:12 UTC (rev 227853)
+++ branches/safari-605-branch/Source/WebCore/workers/service/server/SWServer.cpp 2018-01-30 22:14:14 UTC (rev 227854)
@@ -453,7 +453,6 @@
void SWServer::updateWorker(Connection&, const ServiceWorkerJobDataIdentifier& jobDataIdentifier, SWServerRegistration& registration, const URL& url, const String& script, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicy, WorkerType type)
{
- registration.setLastUpdateTime(WallTime::now());
tryInstallContextData({ jobDataIdentifier, registration.data(), generateObjectIdentifier<ServiceWorkerIdentifierType>(), script, contentSecurityPolicy, url, type, false });
}
Modified: branches/safari-605-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp (227853 => 227854)
--- branches/safari-605-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp 2018-01-30 22:14:12 UTC (rev 227853)
+++ branches/safari-605-branch/Source/WebCore/workers/service/server/SWServerJobQueue.cpp 2018-01-30 22:14:14 UTC (rev 227854)
@@ -81,6 +81,8 @@
return;
}
+ registration->setLastUpdateTime(WallTime::now());
+
// If newestWorker is not null, newestWorker's script url equals job's script url with the exclude fragments
// flag set, and script's source text is a byte-for-byte match with newestWorker's script resource's source
// text, then:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes