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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/wasm/wasm_serialization_worker.js

Issue 2255673003: [wasm] Support wasm module structured cloning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LayoutTests and virtual path Created 4 years, 3 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 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 onmessage = function(e) {
6 var compiled_module = e.data;
7 var instance = new WebAssembly.Instance(compiled_module);
8 if (instance === undefined) {
9 postMessage("error!");
10 return;
11 }
12 var entrypoint = instance.exports["increment"];
13
14 if (typeof entrypoint !== "function") {
15 postMessage("error!");
16 return;
17 }
18
19 var ret = entrypoint(42);
20 postMessage(ret);
21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698