Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(891)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js

Issue 1668473002: ServiceWorker: Wait for the completion of async tasks on ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js
index 317feb1a02d2d0060ef02c427becc22ff9769be2..a0e1ac831ecbdd7c6d45e07fcf8e48f2f624d557 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-worker.js
@@ -1,5 +1,5 @@
self.addEventListener('message', function(event) {
- self.clients.claim()
+ event.waitUntil(self.clients.claim()
.then(function(result) {
if (result !== undefined) {
event.data.port.postMessage(
@@ -10,5 +10,5 @@ self.addEventListener('message', function(event) {
})
.catch(function(error) {
event.data.port.postMessage('FAIL: exception: ' + error.name);
- });
+ }));
});

Powered by Google App Engine
This is Rietveld 408576698