Remove revoked Proxy checks when creating a Proxy (#4261)

In the newer ecma262 standard (post ES11) the ProxyCreate was
changed and the revoked Proxy handler/target is not checked.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
This commit is contained in:
Péter Gál
2020-10-05 10:03:49 +02:00
committed by GitHub
parent 37d6b13891
commit 8edf8d6eea
5 changed files with 31 additions and 60 deletions
+3 -15
View File
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// TODO: Update these tests when the internal routine has been implemented
var target = {}
var handler = {};
var proxy = new Proxy(target, handler);
@@ -43,16 +41,6 @@ try {
assert(e instanceof TypeError);
}
try {
new Proxy({}, rev_proxy);
assert(false);
} catch (e) {
assert(e instanceof TypeError);
}
try {
new Proxy(rev_proxy, {});
assert(false);
} catch (e) {
assert(e instanceof TypeError);
}
/* In ES11+ the standard changed revoked proxy is a valid input for a new Proxy */
var proxy_rev_handler = new Proxy({}, rev_proxy);
var proxy_rev_target_Br = new Proxy(rev_proxy, {});