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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-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/clients-matchall-worker.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-worker.js
index f36be81d23eaad6f62ecb613e5eb1ea5f576ec0f..624921a58091569c68234a8f3eebba3847d73de9 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/clients-matchall-worker.js
@@ -2,7 +2,7 @@ self.onmessage = function(e) {
var port = e.data.port;
var options = e.data.options;
- self.clients.matchAll(options).then(function(clients) {
+ e.waitUntil(self.clients.matchAll(options).then(function(clients) {
var message = [];
clients.forEach(function(client) {
message.push([client.visibilityState,
@@ -11,5 +11,5 @@ self.onmessage = function(e) {
client.frameType]);
});
port.postMessage(message);
- });
+ }));
};

Powered by Google App Engine
This is Rietveld 408576698