ASSERTION FAILED: registration in WebCore::SWServerWorker::skipWaiting()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 23:41:31 +0000 (23:41 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 23:41:31 +0000 (23:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181222
<rdar://problem/36332686>

Reviewed by Youenn Fablet.

Source/WebCore:

Replace assertion in SWServerWorker::skipWaiting() that assumes the worker
has a registration. Nowadays, a SWServerWorker can stay alive for a short
period without having a registration, while it is terminating.

No new tests, unskipped existing test.

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::skipWaiting):

LayoutTests:

Unskip test that is no longer flakily crashing.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226813 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServerWorker.cpp

index 2cc574a..40a2101 100644 (file)
@@ -1,3 +1,15 @@
+2018-01-11  Chris Dumez  <cdumez@apple.com>
+
+        ASSERTION FAILED: registration in WebCore::SWServerWorker::skipWaiting()
+        https://bugs.webkit.org/show_bug.cgi?id=181222
+        <rdar://problem/36332686>
+
+        Reviewed by Youenn Fablet.
+
+        Unskip test that is no longer flakily crashing.
+
+        * TestExpectations:
+
 2018-01-11  Youenn Fablet  <youenn@apple.com>
 
         RTCController should disable ICE candidate filtering in case of getUserMedia based on the RTCPerrConnection origin
index 8a9370b..d8624d5 100644 (file)
@@ -1687,4 +1687,3 @@ imported/w3c/web-platform-tests/workers/worker-performance.worker.html [ Pass Fa
 
 media/event-queue-crash.html [ DumpJSConsoleLogInStdErr ]
 
-webkit.org/b/181222 http/tests/workers/service/cors-image-fetch.html [ Skip ]
index 5177ceb..18cb608 100644 (file)
@@ -1,3 +1,20 @@
+2018-01-11  Chris Dumez  <cdumez@apple.com>
+
+        ASSERTION FAILED: registration in WebCore::SWServerWorker::skipWaiting()
+        https://bugs.webkit.org/show_bug.cgi?id=181222
+        <rdar://problem/36332686>
+
+        Reviewed by Youenn Fablet.
+
+        Replace assertion in SWServerWorker::skipWaiting() that assumes the worker
+        has a registration. Nowadays, a SWServerWorker can stay alive for a short
+        period without having a registration, while it is terminating.
+
+        No new tests, unskipped existing test.
+
+        * workers/service/server/SWServerWorker.cpp:
+        (WebCore::SWServerWorker::skipWaiting):
+
 2018-01-11  Antti Koivisto  <antti@apple.com>
 
         Don't call RenderElement::setStyle when nothing changes
index ff42551..843ccbe 100644 (file)
@@ -133,8 +133,9 @@ void SWServerWorker::skipWaiting()
     m_isSkipWaitingFlagSet = true;
 
     auto* registration = m_server.getRegistration(m_registrationKey);
-    ASSERT(registration);
-    registration->tryActivate();
+    ASSERT(registration || isTerminating());
+    if (registration)
+        registration->tryActivate();
 }
 
 void SWServerWorker::setHasPendingEvents(bool hasPendingEvents)