summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorMichaƫl Zasso <targos@protonmail.com>2018-09-17 12:47:16 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-09-20 05:58:53 +0200
commit2811ae48017828579928999e3c4f77fb4c32f77c (patch)
treedfadf2cc8e8dd16589c7778fc3ae97772e1cc8be /deps/v8/test
parentfadafef4f4e673b71cb33078a588daddf8deed3a (diff)
downloadandroid-node-v8-2811ae48017828579928999e3c4f77fb4c32f77c.tar.gz
android-node-v8-2811ae48017828579928999e3c4f77fb4c32f77c.tar.bz2
android-node-v8-2811ae48017828579928999e3c4f77fb4c32f77c.zip
deps: patch V8 to 6.9.427.23
PR-URL: https://github.com/nodejs/node/pull/22898 Refs: https://github.com/v8/v8/compare/6.9.427.22...6.9.427.23 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/mjsunit/wasm/disallow-codegen.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/wasm/disallow-codegen.js b/deps/v8/test/mjsunit/wasm/disallow-codegen.js
index 9ac2bcd103..f1303e845f 100644
--- a/deps/v8/test/mjsunit/wasm/disallow-codegen.js
+++ b/deps/v8/test/mjsunit/wasm/disallow-codegen.js
@@ -65,6 +65,16 @@ async function AsyncTestOk() {
promise, module => assertInstanceof(module, WebAssembly.Module));
}
+async function AsyncTestWithInstantiateOk() {
+ print('async module instantiate (ok)...');
+ %DisallowCodegenFromStrings(false);
+ %DisallowWasmCodegen(false);
+ let promise = WebAssembly.instantiate(buffer);
+ assertPromiseResult(
+ promise,
+ module => assertInstanceof(module.instance, WebAssembly.Instance));
+}
+
async function AsyncTestFail() {
print('async module compile (fail)...');
%DisallowCodegenFromStrings(true);
@@ -78,6 +88,19 @@ async function AsyncTestFail() {
}
}
+async function AsyncTestWithInstantiateFail() {
+ print('async module instantiate (fail)...');
+ %DisallowCodegenFromStrings(true);
+ %DisallowWasmCodegen(false);
+ try {
+ let m = await WebAssembly.instantiate(buffer);
+ assertUnreachable();
+ } catch (e) {
+ print(" " + e);
+ assertInstanceof(e, WebAssembly.CompileError);
+ }
+}
+
async function AsyncTestWasmFail(disallow_codegen) {
print('async wasm module compile (fail)...');
%DisallowCodegenFromStrings(disallow_codegen);
@@ -91,6 +114,19 @@ async function AsyncTestWasmFail(disallow_codegen) {
}
}
+async function AsyncTestWasmWithInstantiateFail(disallow_codegen) {
+ print('async wasm module instantiate (fail)...');
+ %DisallowCodegenFromStrings(disallow_codegen);
+ %DisallowWasmCodegen(true);
+ try {
+ let m = await WebAssembly.instantiate(buffer);
+ assertUnreachable();
+ } catch (e) {
+ print(" " + e);
+ assertInstanceof(e, WebAssembly.CompileError);
+ }
+}
+
async function StreamingTestOk() {
print('streaming module compile (ok)...');
// TODO(titzer): compileStreaming must be supplied by embedder.
@@ -149,7 +185,9 @@ async function RunAll() {
await SyncTestOk();
await SyncTestFail();
await AsyncTestOk();
+ await AsyncTestWithInstantiateOk();
await AsyncTestFail();
+ await AsyncTestWithInstantiateFail();
await StreamingTestOk();
await StreamingTestFail();
@@ -157,6 +195,7 @@ async function RunAll() {
for (count = 0; count < 2; ++count) {
SyncTestWasmFail(disallow_codegen);
AsyncTestWasmFail(disallow_codegen);
+ AsyncTestWasmWithInstantiateFail(disallow_codegen);
StreamingTestWasmFail(disallow_codegen)
disallow_codegen = true;
}