summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/wasm/shared-memory.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/wasm/shared-memory.js')
-rw-r--r--deps/v8/test/mjsunit/wasm/shared-memory.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/deps/v8/test/mjsunit/wasm/shared-memory.js b/deps/v8/test/mjsunit/wasm/shared-memory.js
index bbe89a3fe5..80e894b28f 100644
--- a/deps/v8/test/mjsunit/wasm/shared-memory.js
+++ b/deps/v8/test/mjsunit/wasm/shared-memory.js
@@ -4,7 +4,6 @@
// Flags: --experimental-wasm-threads
-load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
function assertMemoryIsValid(memory, shared) {
@@ -130,3 +129,17 @@ function assertMemoryIsValid(memory, shared) {
assertEquals(0, instance.exports.main(0, 0x11111111));
assertEquals(0x11111111, instance.exports.main(0, 0x11111111));
})();
+
+(function TestMemoryConstructorShouldNotCallHasProperty() {
+ print(arguments.callee.name);
+ // from test/wasm-js/data/test/js-api/memory/constructor.any.js
+ const proxy = new Proxy({}, {
+ has(o, x) {
+ throw new Error(`Should not call [[HasProperty]] with ${x}`);
+ },
+ get(o, x) {
+ return 0;
+ },
+ });
+ new WebAssembly.Memory(proxy);
+})();