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); |
}; |