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

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

Issue 2262103002: [wasm] Pass the context to ToJS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-imports-context
Patch Set: 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
Index: test/mjsunit/wasm/ffi-error.js
diff --git a/test/mjsunit/wasm/ffi-error.js b/test/mjsunit/wasm/ffi-error.js
index 81dc47806e767f00a8f3bdec9230deae2e3fc05d..6bdb657443e924b58e6cc7ccae39219b2266a55f 100644
--- a/test/mjsunit/wasm/ffi-error.js
+++ b/test/mjsunit/wasm/ffi-error.js
@@ -78,3 +78,24 @@ assertThrows(function() {
module.exports.function_with_invalid_signature(33, 88);
}, TypeError);
})();
+
+(function I64JSImportThrows() {
+ var builder = new WasmModuleBuilder();
+
+ var sig_index = builder.addType(kSig_i_i);
+ var sig_i64_index = builder.addType(kSig_i_l);
+ var index = builder.addImport("func", sig_i64_index);
+ builder.addFunction("main", sig_index)
+ .addBody([
+ kExprGetLocal, 0,
+ kExprI64SConvertI32,
+ kExprCallImport, kArity1, index // --
+ ]) // --
+ .exportFunc();
+
+ var func = function() {return {};};
+ var main = builder.instantiate({func: func}).exports.main;
+ assertThrows(function() {
+ main(13);
+ }, TypeError);
+})();

Powered by Google App Engine
This is Rietveld 408576698