| Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
|
| diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
|
| index 80fdfe9f99faf39d304bcf77eae8c976a2e3ca00..ea9234923f3e6f243a7afa6648c1e955b4f2b419 100644
|
| --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
|
| +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js
|
| @@ -1,5 +1,3 @@
|
| -self.importScripts('worker-common.js');
|
| -
|
| self.onmessage = function(msg) {
|
| if (msg.data.proxy)
|
| self.proxy = msg.data.proxy;
|
| @@ -15,3 +13,14 @@ self.onmessage = function(msg) {
|
| postMessage({});
|
| });
|
| }
|
| +
|
| +function awaitProxyInit(proxy) {
|
| + return new Promise((resolve, reject) => {
|
| + function check() {
|
| + if (proxy.initialized)
|
| + resolve(proxy);
|
| + requestAnimationFrame(check);
|
| + }
|
| + requestAnimationFrame(check);
|
| + });
|
| +}
|
|
|