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

Unified Diff: test/mjsunit/wasm/table.js

Issue 2358923003: [wasm] Bound the table size by Smi::kMaxValue. (Closed)
Patch Set: Bound the table size by 2^26 Created 4 years, 3 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/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/table.js
diff --git a/test/mjsunit/wasm/table.js b/test/mjsunit/wasm/table.js
index 04957036514026f44dfc0d0676d0a16bb4327314..c04e3e2ad1de204e7ce9fa3f39e2fb7fb630cd68 100644
--- a/test/mjsunit/wasm/table.js
+++ b/test/mjsunit/wasm/table.js
@@ -7,6 +7,7 @@
// Basic tests.
var outOfUint32RangeValue = 1e12;
+var int32ButOob = 1073741824;
(function TestConstructor() {
assertTrue(WebAssembly.Table instanceof Function);
@@ -35,6 +36,8 @@ var outOfUint32RangeValue = 1e12;
assertThrows(() => new WebAssembly.Table({element: "anyfunc", initial: 10, maximum: outOfUint32RangeValue}), RangeError);
assertThrows(() => new WebAssembly.Table({element: "anyfunc", initial: 10, maximum: 9}), RangeError);
+ assertThrows(() => new WebAssembly.Table({element: "anyfunc", initial: 0, maximum: int32ButOob}));
+
let table = new WebAssembly.Table({element: "anyfunc", initial: 1});
assertSame(WebAssembly.Table.prototype, table.__proto__);
assertSame(WebAssembly.Table, table.constructor);
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698