aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js')
-rw-r--r--deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js b/deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js
new file mode 100644
index 0000000000..39d9158e1a
--- /dev/null
+++ b/deps/v8/test/message/fail/wasm-streaming-instantiate-fail.js
@@ -0,0 +1,12 @@
+// Copyright 2019 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-test-streaming
+
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+let builder = new WasmModuleBuilder();
+builder.addFunction('f', kSig_i_v).addBody([]);
+let rethrow = e => setTimeout(_ => {throw e}, 0);
+WebAssembly.instantiateStreaming(builder.toBuffer()).catch(rethrow);