Proxy constructor should throw if handler is revoked Proxy
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2019 00:56:08 +0000 (00:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Aug 2019 00:56:08 +0000 (00:56 +0000)
commitd9a40a920329b6cac22ee5876e3038843dfd9b0b
treea7ab733ae969ddd7e03480e58b75797db5d1dcec
parentb64ded54eb02e05798798e2a4f9c17fdb964ca8c
Proxy constructor should throw if handler is revoked Proxy
https://bugs.webkit.org/show_bug.cgi?id=198755

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-19
Reviewed by Saam Barati.

JSTests:

* stress/proxy-revoke.js: Adjust error message.
* test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

Reword error message and check if handler is revoked Proxy.
(step 4 of https://tc39.es/ecma262/#sec-proxycreate)

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::finishCreation): Add isRevoked check.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/proxy-revoke.js
JSTests/test262/expectations.yaml
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ProxyObject.cpp