From e8e3aaa77bb63b16407569ebd070860af3424a0a Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Sat, 28 Mar 2020 16:41:25 +0200 Subject: [PATCH] Test revoked [[ProxyHandler]] --- .../Proxy/create-handler-is-revoked-proxy.js | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/built-ins/Proxy/create-handler-is-revoked-proxy.js b/test/built-ins/Proxy/create-handler-is-revoked-proxy.js index fc9a343dc8..95fb71c035 100644 --- a/test/built-ins/Proxy/create-handler-is-revoked-proxy.js +++ b/test/built-ins/Proxy/create-handler-is-revoked-proxy.js @@ -1,21 +1,22 @@ // Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 9.5.15 +esid: sec-proxycreate description: > - Proxy ( target, handler ) - ... - 4. If handler is a Proxy exotic object and the value of the - [[ProxyHandler]] internal slot of handler is null, throw a - TypeError exception. - ... + A Proxy is created with its [[ProxyHandler]] as revoked Proxy. +info: | + ProxyCreate ( target, handler ) + + [...] + 3. Let P be ! MakeBasicObject(« [[ProxyHandler]], [[ProxyTarget]] »). + [...] + 7. Set P.[[ProxyHandler]] to handler. + 8. Return P. features: [Proxy] ---*/ var revocable = Proxy.revocable({}, {}); - revocable.revoke(); -assert.throws(TypeError, function() { - new Proxy({}, revocable.proxy); -}); +var proxy = new Proxy({}, revocable.proxy); +assert.sameValue(typeof proxy, "object");