Title: [224741] trunk/Source/WebCore
Revision
224741
Author
[email protected]
Date
2017-11-12 22:39:14 -0800 (Sun, 12 Nov 2017)

Log Message

[Service Workers] Activate algorithm says terminate the active worker if it exists
https://bugs.webkit.org/show_bug.cgi?id=179559

Reviewed by Darin Adler.

Activate algorithm says terminate the active worker if it exists:
- https://w3c.github.io/ServiceWorker/#activation-algorithm (Step 2.1)

No new tests, no-op for now as the terminate() function is not implemented
yet.

* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::activate):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (224740 => 224741)


--- trunk/Source/WebCore/ChangeLog	2017-11-13 06:12:09 UTC (rev 224740)
+++ trunk/Source/WebCore/ChangeLog	2017-11-13 06:39:14 UTC (rev 224741)
@@ -1,3 +1,19 @@
+2017-11-12  Chris Dumez  <[email protected]>
+
+        [Service Workers] Activate algorithm says terminate the active worker if it exists
+        https://bugs.webkit.org/show_bug.cgi?id=179559
+
+        Reviewed by Darin Adler.
+
+        Activate algorithm says terminate the active worker if it exists:
+        - https://w3c.github.io/ServiceWorker/#activation-algorithm (Step 2.1)
+
+        No new tests, no-op for now as the terminate() function is not implemented
+        yet.
+
+        * workers/service/server/SWServerJobQueue.cpp:
+        (WebCore::SWServerJobQueue::activate):
+
 2017-11-12  Darin Adler  <[email protected]>
 
         More is<> and downcast<>, less static_cast<>

Modified: trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp (224740 => 224741)


--- trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2017-11-13 06:12:09 UTC (rev 224740)
+++ trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2017-11-13 06:39:14 UTC (rev 224741)
@@ -205,11 +205,11 @@
         return;
 
     // If registration's active worker is not null, then:
-    if (registration.activeWorker()) {
+    if (auto* activeWorker = registration.activeWorker()) {
         // Terminate registration's active worker.
-        // registration.activeWorker()->terminate();
+        activeWorker->terminate();
         // Run the Update Worker State algorithm passing registration's active worker and redundant as the arguments.
-        registration.updateWorkerState(*registration.activeWorker(), ServiceWorkerState::Redundant);
+        registration.updateWorkerState(*activeWorker, ServiceWorkerState::Redundant);
     }
     // Run the Update Registration State algorithm passing registration, "active" and registration's waiting worker as the arguments.
     registration.updateRegistrationState(ServiceWorkerRegistrationState::Active, registration.waitingWorker());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to