Title: [261507] branches/safari-609-branch
- Revision
- 261507
- Author
- [email protected]
- Date
- 2020-05-11 17:21:15 -0700 (Mon, 11 May 2020)
Log Message
Cherry-pick r257929. rdar://problem/62978899
In case an activating service worker is terminated, it should go to activated state
https://bugs.webkit.org/show_bug.cgi?id=208440
<rdar://problem/59742332>
Reviewed by Chris Dumez.
Source/WebCore:
Covered by updated test.
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::setState):
As per spec, if an activated service worker is terminated or its activate event is timing out,
we should move it to activate state.
LayoutTests:
* http/wpt/service-workers/service-worker-spinning-activate.https.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609-branch/LayoutTests/ChangeLog (261506 => 261507)
--- branches/safari-609-branch/LayoutTests/ChangeLog 2020-05-11 23:59:40 UTC (rev 261506)
+++ branches/safari-609-branch/LayoutTests/ChangeLog 2020-05-12 00:21:15 UTC (rev 261507)
@@ -1,3 +1,39 @@
+2020-05-07 Russell Epstein <[email protected]>
+
+ Cherry-pick r257929. rdar://problem/62978899
+
+ In case an activating service worker is terminated, it should go to activated state
+ https://bugs.webkit.org/show_bug.cgi?id=208440
+ <rdar://problem/59742332>
+
+ Reviewed by Chris Dumez.
+
+ Source/WebCore:
+
+ Covered by updated test.
+
+ * workers/service/server/SWServerWorker.cpp:
+ (WebCore::SWServerWorker::setState):
+ As per spec, if an activated service worker is terminated or its activate event is timing out,
+ we should move it to activate state.
+
+ LayoutTests:
+
+ * http/wpt/service-workers/service-worker-spinning-activate.https.html:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-03-05 youenn fablet <[email protected]>
+
+ In case an activating service worker is terminated, it should go to activated state
+ https://bugs.webkit.org/show_bug.cgi?id=208440
+ <rdar://problem/59742332>
+
+ Reviewed by Chris Dumez.
+
+ * http/wpt/service-workers/service-worker-spinning-activate.https.html:
+
2020-04-28 Ryan Haddad <[email protected]>
Cherry-pick r259880. rdar://problem/62271251
Modified: branches/safari-609-branch/LayoutTests/http/wpt/service-workers/service-worker-spinning-activate.https.html (261506 => 261507)
--- branches/safari-609-branch/LayoutTests/http/wpt/service-workers/service-worker-spinning-activate.https.html 2020-05-11 23:59:40 UTC (rev 261506)
+++ branches/safari-609-branch/LayoutTests/http/wpt/service-workers/service-worker-spinning-activate.https.html 2020-05-12 00:21:15 UTC (rev 261507)
@@ -27,7 +27,9 @@
await Promise.all(promises);
- return waitForServiceWorkerNoLongerRunning(worker);
+ await waitForServiceWorkerNoLongerRunning(worker);
+
+ await waitForState(worker, "activated");
}, "Spin in activate");
promise_test(async (test) => {
Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (261506 => 261507)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-05-11 23:59:40 UTC (rev 261506)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-05-12 00:21:15 UTC (rev 261507)
@@ -1,3 +1,44 @@
+2020-05-07 Russell Epstein <[email protected]>
+
+ Cherry-pick r257929. rdar://problem/62978899
+
+ In case an activating service worker is terminated, it should go to activated state
+ https://bugs.webkit.org/show_bug.cgi?id=208440
+ <rdar://problem/59742332>
+
+ Reviewed by Chris Dumez.
+
+ Source/WebCore:
+
+ Covered by updated test.
+
+ * workers/service/server/SWServerWorker.cpp:
+ (WebCore::SWServerWorker::setState):
+ As per spec, if an activated service worker is terminated or its activate event is timing out,
+ we should move it to activate state.
+
+ LayoutTests:
+
+ * http/wpt/service-workers/service-worker-spinning-activate.https.html:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-03-05 youenn fablet <[email protected]>
+
+ In case an activating service worker is terminated, it should go to activated state
+ https://bugs.webkit.org/show_bug.cgi?id=208440
+ <rdar://problem/59742332>
+
+ Reviewed by Chris Dumez.
+
+ Covered by updated test.
+
+ * workers/service/server/SWServerWorker.cpp:
+ (WebCore::SWServerWorker::setState):
+ As per spec, if an activated service worker is terminated or its activate event is timing out,
+ we should move it to activate state.
+
2020-05-07 Alan Coon <[email protected]>
Cherry-pick r260480. rdar://problem/62977665
Modified: branches/safari-609-branch/Source/WebCore/workers/service/server/SWServerWorker.cpp (261506 => 261507)
--- branches/safari-609-branch/Source/WebCore/workers/service/server/SWServerWorker.cpp 2020-05-11 23:59:40 UTC (rev 261506)
+++ branches/safari-609-branch/Source/WebCore/workers/service/server/SWServerWorker.cpp 2020-05-12 00:21:15 UTC (rev 261507)
@@ -249,8 +249,13 @@
m_shouldSkipHandleFetch = false;
break;
case State::Terminating:
+ callWhenActivatedHandler(false);
+ break;
case State::NotRunning:
callWhenActivatedHandler(false);
+ // As per https://w3c.github.io/ServiceWorker/#activate, a worker goes to activated even if activating fails.
+ if (m_data.state == ServiceWorkerState::Activating)
+ didFinishActivation();
break;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes