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

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

Issue 2291043002: [wasm] Use the native_context for the TypeError in ToJS() (Closed)
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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | 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 81dc47806e767f00a8f3bdec9230deae2e3fc05d..aca5123d3bec699edd950cb0861f83bd02cb78f8 100644
--- a/test/mjsunit/wasm/ffi-error.js
+++ b/test/mjsunit/wasm/ffi-error.js
@@ -78,3 +78,23 @@ 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);
+})();
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698