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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js

Issue 2119383002: [compositorworker] Avoid deadlock issue caused by importScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
index e551f837ead12a789ae9eef0de8763c6b36d265e..995c75acc0498c4b47077f141e54bb0025ca57fb 100644
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
@@ -1,5 +1,3 @@
-self.importScripts('worker-common.js');
-
self.onmessage = function(msg) {
if (msg.data.proxy)
self.proxy = msg.data.proxy;
@@ -14,3 +12,14 @@ self.onmessage = function(msg) {
postMessage(values);
});
}
+
+function awaitProxyInit(proxy) {
+ return new Promise((resolve, reject) => {
+ function check() {
+ if (proxy.initialized)
+ resolve(proxy);
+ requestAnimationFrame(check);
jbroman 2016/07/06 15:14:00 ex-post-facto question: This looks like it will co
majidvp 2016/07/06 17:45:38 It definitely should!
+ }
+ requestAnimationFrame(check);
+ });
+}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-worker-to-main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698