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

Unified Diff: test/mjsunit/wasm/ffi-error.js

Issue 2254803002: [wasm] Throw a type error if an I64 is exported to JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove IfSuccess nodes for now. Created 4 years, 4 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 | « test/mjsunit/wasm/calls.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/ffi-error.js
diff --git a/test/mjsunit/wasm/ffi-error.js b/test/mjsunit/wasm/ffi-error.js
index b6474c6fed5a8cc58605af315dd0f34a672095e9..81dc47806e767f00a8f3bdec9230deae2e3fc05d 100644
--- a/test/mjsunit/wasm/ffi-error.js
+++ b/test/mjsunit/wasm/ffi-error.js
@@ -59,3 +59,22 @@ assertThrows(function() {
ffi.fun = 0;
testCallFFI(ffi);
});
+
+
+(function I64InSignatureThrows() {
+ var builder = new WasmModuleBuilder();
+
+ builder.addMemory(1, 1, true);
+ builder.addFunction("function_with_invalid_signature", kSig_l_ll)
+ .addBody([ // --
+ kExprGetLocal, 0, // --
+ kExprGetLocal, 1, // --
+ kExprI64Sub]) // --
+ .exportFunc()
+
+ var module = builder.instantiate();
+
+ assertThrows(function() {
+ module.exports.function_with_invalid_signature(33, 88);
+ }, TypeError);
+})();
« no previous file with comments | « test/mjsunit/wasm/calls.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698