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

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

Issue 2367673003: [wasm] Do a proper HasProperty() check in the memory and table setup. (Closed)
Patch Set: 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
« src/wasm/wasm-js.cc ('K') | « 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/memory.js
diff --git a/test/mjsunit/wasm/memory.js b/test/mjsunit/wasm/memory.js
index a90d44c41ad8607c166d853ea69be316f7e7f8b4..b6f2ce3c605aee9224a593b8ac5937f80af076a3 100644
--- a/test/mjsunit/wasm/memory.js
+++ b/test/mjsunit/wasm/memory.js
@@ -42,6 +42,15 @@ var outOfUint32RangeValue = 1e12;
assertTrue(memory instanceof WebAssembly.Memory);
})();
+(function TestInitialIsUndefined() {
Franzi 2016/09/23 17:23:28 I think this test passes without your change as we
ahaas 2016/09/26 09:19:12 Done, and I also added many more tests.
+ // New memory with initial = undefined, which means initial = 0.
+ let memory = new WebAssembly.Memory({initial: undefined});
+ assertSame(WebAssembly.Memory.prototype, memory.__proto__);
+ assertSame(WebAssembly.Memory, memory.constructor);
+ assertTrue(memory instanceof Object);
+ assertTrue(memory instanceof WebAssembly.Memory);
+})();
+
(function TestBuffer() {
let memory = new WebAssembly.Memory({initial: 1});
assertTrue(memory.buffer instanceof Object);
« src/wasm/wasm-js.cc ('K') | « src/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698