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

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

Issue 2405153003: [wasm] support for recompilation if deserialization fails (Closed)
Patch Set: uncompiled->wire Created 4 years, 2 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/http/tests/wasm/wasm_indexeddb_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js b/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
new file mode 100644
index 0000000000000000000000000000000000000000..a0a0e5a8be4c1f8287b0ce835641de1b2ef13d98
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load_wasm.js
@@ -0,0 +1,21 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function createWasmModule() {
+ // the file incrementer.wasm is copied from
+ // //v8/test/mjsunit/wasm. This is because currently we cannot
+ // reference files outside the LayoutTests folder. When wasm format
+ // changes require that file to be updated, there is a test on the
+ // v8 side (same folder), ensure-wasm-binaries-up-to-date.js, which
+ // fails and will require incrementer.wasm to be updated on that side.
+ return fetch('incrementer.wasm')
+ .then(response => {
+ if (!response.ok) throw new Error(response.statusText);
+ return response.arrayBuffer();
+ })
+ .then(data => {
+ var mod = new WebAssembly.Module(data);
+ return mod;
+ });
+}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698