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

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

Issue 2808743005: [wasm] Compile closer to how customers will. (Closed)
Patch Set: [wasm] Compile closer to how customers will. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function createWasmModule() { 5 function createWasmModule() {
6 // the file incrementer.wasm is copied from 6 // the file incrementer.wasm is copied from
7 // //v8/test/mjsunit/wasm. This is because currently we cannot 7 // //v8/test/mjsunit/wasm. This is because currently we cannot
8 // reference files outside the LayoutTests folder. When wasm format 8 // reference files outside the LayoutTests folder. When wasm format
9 // changes require that file to be updated, there is a test on the 9 // changes require that file to be updated, there is a test on the
10 // v8 side (same folder), ensure-wasm-binaries-up-to-date.js, which 10 // v8 side (same folder), ensure-wasm-binaries-up-to-date.js, which
11 // fails and will require incrementer.wasm to be updated on that side. 11 // fails and will require incrementer.wasm to be updated on that side.
12 return fetch('incrementer.wasm') 12 return fetch('incrementer.wasm')
13 .then(response => { 13 .then(response => {
14 if (!response.ok) throw new Error(response.statusText); 14 if (!response.ok) throw new Error(response.statusText);
15 return response.arrayBuffer(); 15 return response.arrayBuffer();
16 }) 16 })
17 .then(data => { 17 .then(WebAssembly.compile);
18 var mod = new WebAssembly.Module(data);
19 return mod;
20 });
21 } 18 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/wasm/wasm-limits-tests.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698