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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-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/client-id-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js
index 74bc3927ebe560eaa747341dc709ed58f404caef..ec71b3458b7214fc7675f6f75997cc82a47cac82 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/client-id-worker.js
@@ -2,7 +2,7 @@ self.onmessage = function(e) {
var port = e.data.port;
var message = [];
- Promise.resolve()
+ var promise = Promise.resolve()
.then(function() {
// 1st matchAll()
return self.clients.matchAll().then(function(clients) {
@@ -23,4 +23,5 @@ self.onmessage = function(e) {
// Send an array containing ids of clients from 1st and 2nd matchAll()
port.postMessage(message);
});
+ e.waitUntil(promise);
};

Powered by Google App Engine
This is Rietveld 408576698