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

Unified Diff: test/mjsunit/wasm/asm-wasm.js

Issue 2109533002: [wasm] Require wasm explicit asm instantiation to be of a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/regress/regress-wasm-crbug-620649.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/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index 4c28b619c306b9b6691e3a8e2a189a372a37de69..4391e039ebfb977a24f31ef7802a3abb36ed423d 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -1530,3 +1530,15 @@ assertWasm(1, TestXor);
assertEquals(0x80000000, wasm.u0x80000000());
assertEquals(0x87654321, wasm.u0x87654321());
})();
+
+(function TestBadNoDeclaration() {
+ assertThrows(function() {
+ Wasm.instantiateModuleFromAsm('33;');
+ });
+})();
+
+(function TestBadVarDeclaration() {
+ assertThrows(function() {
+ Wasm.instantiateModuleFromAsm('var x = 3;');
+ });
+})();
« no previous file with comments | « test/mjsunit/regress/regress-wasm-crbug-620649.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698