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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/wasm/resources/service-worker.js

Issue 2749503002: [wasm] enable wasm structured cloning in specific cases (Closed)
Patch Set: async Created 3 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 var port;
2
3 importScripts('load_wasm.js');
4
5 self.onmessage = function(e) {
6 var message = e.data;
7 if ('port' in message) {
8 port = message.port;
9 }
10 };
11
12 // And an event listener:
13 self.addEventListener('message', function(e) {
14 var message = e.data;
15 if ("compile" in message) {
16 createWasmModule()
17 .then(m => {
18 try {
19 port.postMessage({type:"OK", module:m});
20 } catch (e) {
21 port.postMessage({type:"SEND ERROR"});
22 }
23 })
24 .catch(e => port.postMessage({type:"OTHER ERROR"}));
25 }
26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698