Title: [225346] trunk
Revision
225346
Author
cdu...@apple.com
Date
2017-11-30 13:41:59 -0800 (Thu, 30 Nov 2017)

Log Message

ServiceWorkerGlobalScope::skipWaiting() should resolve its promise
https://bugs.webkit.org/show_bug.cgi?id=180204

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

Rebaseline test which uses skipWaiting().

* web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt:

Source/WebCore:

ServiceWorkerGlobalScope::skipWaiting() should resolve its promise, even if it is not
implemented yet. For now, always reject the promise.

* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::skipWaiting):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (225345 => 225346)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2017-11-30 21:35:47 UTC (rev 225345)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2017-11-30 21:41:59 UTC (rev 225346)
@@ -1,5 +1,16 @@
 2017-11-30  Chris Dumez  <cdu...@apple.com>
 
+        ServiceWorkerGlobalScope::skipWaiting() should resolve its promise
+        https://bugs.webkit.org/show_bug.cgi?id=180204
+
+        Reviewed by Brady Eidson.
+
+        Rebaseline test which uses skipWaiting().
+
+        * web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt:
+
+2017-11-30  Chris Dumez  <cdu...@apple.com>
+
         Populate self.registration.installing/waiting/active inside service workers
         https://bugs.webkit.org/show_bug.cgi?id=180168
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt (225345 => 225346)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt	2017-11-30 21:35:47 UTC (rev 225345)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/claim-with-redirect.https-expected.txt	2017-11-30 21:41:59 UTC (rev 225346)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Cannot update a null/nonexistent service worker registration
+CONSOLE MESSAGE: line 27: Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'r.update')
   
 
 FAIL Claim works after redirection to another origin assert_equals: expected (string) "updated" but got (undefined) undefined

Modified: trunk/Source/WebCore/ChangeLog (225345 => 225346)


--- trunk/Source/WebCore/ChangeLog	2017-11-30 21:35:47 UTC (rev 225345)
+++ trunk/Source/WebCore/ChangeLog	2017-11-30 21:41:59 UTC (rev 225346)
@@ -1,5 +1,18 @@
 2017-11-30  Chris Dumez  <cdu...@apple.com>
 
+        ServiceWorkerGlobalScope::skipWaiting() should resolve its promise
+        https://bugs.webkit.org/show_bug.cgi?id=180204
+
+        Reviewed by Brady Eidson.
+
+        ServiceWorkerGlobalScope::skipWaiting() should resolve its promise, even if it is not
+        implemented yet. For now, always reject the promise.
+
+        * workers/service/ServiceWorkerGlobalScope.cpp:
+        (WebCore::ServiceWorkerGlobalScope::skipWaiting):
+
+2017-11-30  Chris Dumez  <cdu...@apple.com>
+
         Mark a few heap-allocated service worker types as WTF_MAKE_FAST_ALLOCATED
         https://bugs.webkit.org/show_bug.cgi?id=180212
 

Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp (225345 => 225346)


--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp	2017-11-30 21:35:47 UTC (rev 225345)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp	2017-11-30 21:41:59 UTC (rev 225346)
@@ -46,8 +46,10 @@
 
 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() = default;
 
-void ServiceWorkerGlobalScope::skipWaiting(Ref<DeferredPromise>&&)
+void ServiceWorkerGlobalScope::skipWaiting(Ref<DeferredPromise>&& promise)
 {
+    // FIXME: Implement this.
+    promise->reject(Exception { NotSupportedError, ASCIILiteral("self.skipWaiting() is not yet supported") });
 }
 
 EventTargetInterface ServiceWorkerGlobalScope::eventTargetInterface() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to