Title: [224785] trunk/Source/WebCore
Revision
224785
Author
[email protected]
Date
2017-11-13 15:00:04 -0800 (Mon, 13 Nov 2017)

Log Message

Add some more assertions in SWServerJobQueue
https://bugs.webkit.org/show_bug.cgi?id=179626

Reviewed by Alex Christensen.

Add some more assertions in SWServerJobQueue for extra safety.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (224784 => 224785)


--- trunk/Source/WebCore/ChangeLog	2017-11-13 22:58:04 UTC (rev 224784)
+++ trunk/Source/WebCore/ChangeLog	2017-11-13 23:00:04 UTC (rev 224785)
@@ -1,3 +1,16 @@
+2017-11-13  Chris Dumez  <[email protected]>
+
+        Add some more assertions in SWServerJobQueue
+        https://bugs.webkit.org/show_bug.cgi?id=179626
+
+        Reviewed by Alex Christensen.
+
+        Add some more assertions in SWServerJobQueue for extra safety.
+
+        * workers/service/server/SWServerJobQueue.cpp:
+        (WebCore::SWServerJobQueue::didResolveRegistrationPromise):
+        (WebCore::SWServerJobQueue::didFinishInstall):
+
 2017-11-13  Per Arne Vollan  <[email protected]>
 
         The css properties stroke-width/stroke-color and -webkit-text-stroke-width/-webkit-text-stroke-color should not be mixed.

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


--- trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2017-11-13 22:58:04 UTC (rev 224784)
+++ trunk/Source/WebCore/workers/service/server/SWServerJobQueue.cpp	2017-11-13 23:00:04 UTC (rev 224785)
@@ -128,6 +128,7 @@
 {
     auto* registration = m_server.getRegistration(m_registrationKey);
     ASSERT(registration);
+    ASSERT(registration->installingWorker());
 
     // Queue a task to fire an event named updatefound at all the ServiceWorkerRegistration objects
     // for all the service worker clients whose creation URL matches registration's scope url and
@@ -143,6 +144,8 @@
 {
     auto* registration = m_server.getRegistration(m_registrationKey);
     ASSERT(registration);
+    ASSERT(registration->installingWorker());
+    ASSERT(registration->installingWorker()->identifier() == identifier);
 
     if (!wasSuccessful) {
         auto* worker = m_server.workerByID(identifier);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to