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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-msgport-to-client-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/postmessage-msgport-to-client-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-msgport-to-client-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-msgport-to-client-worker.js
index 3475321f4a6813e808bdc969d86240b62cafd12d..4eb14ee1c41337b805f2ce65186b0f8b21219380 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-msgport-to-client-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/postmessage-msgport-to-client-worker.js
@@ -1,5 +1,5 @@
self.onmessage = function(e) {
- self.clients.matchAll().then(function(clients) {
+ e.waitUntil(self.clients.matchAll().then(function(clients) {
clients.forEach(function(client) {
var messageChannel = new MessageChannel();
messageChannel.port1.onmessage =
@@ -7,7 +7,7 @@ self.onmessage = function(e) {
client.postMessage({port: messageChannel.port2},
[messageChannel.port2]);
});
- });
+ }));
};
function onMessageViaMessagePort(client, e) {

Powered by Google App Engine
This is Rietveld 408576698