diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js new file mode 100644 index 0000000000..384be1cf57 --- /dev/null +++ b/js/src/jit-test/tests/proxy/testDirectProxyPreventExtensions1.js @@ -0,0 +1,10 @@ +// Forward to the target if the trap is not defined +var target = {}; +var proxy = new Proxy(target, {}); +Object.preventExtensions(proxy); +assertEq(Object.isExtensible(target), false); + +target = {}; +proxy = Proxy.revocable(target, {}).proxy; +Object.preventExtensions(proxy); +assertEq(Object.isExtensible(target), false); |