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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js

Issue 2041193005: [compositorworker] compositor proxy mutation updates underlying layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-upstream-registration
Patch Set: Use RAII pattern Created 4 years, 6 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/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
index 3089a48ec3601a3a2b37532e9212bd3ef17806a2..8134fac6fb2052cb4c8eb769df336c71a576485e 100644
--- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/proxy-mutate.js
@@ -1,14 +1,19 @@
-onmessage = function(msg) {
- var proxy = msg.data[0];
- var attrib = msg.data[1];
+self.importScripts('worker-common.js');
+
+self.onmessage = function(msg) {
+ var proxy = msg.data[0];
+ var attrib = msg.data[1];
+
+ awaitProxyInit(proxy).then((proxy) => {
try {
- if (proxy.supports(attrib)) {
- proxy[attrib] = 0;
- postMessage('success');
- } else {
- postMessage('error: Received non-supported attribute "' + attrib + '"');
- }
+ if (proxy.supports(attrib)) {
+ proxy[attrib] = 0;
+ postMessage('success');
+ } else {
+ postMessage('error: Received non-supported attribute "' + attrib + '"');
+ }
} catch (e) {
- postMessage('error: ' + e);
+ postMessage('error: ' + e);
}
+ });
}

Powered by Google App Engine
This is Rietveld 408576698