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:
@@ -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 = function () {};
|
||||
var handler = { get (name) {
|
||||
return 5;
|
||||
@@ -48,17 +46,21 @@ try {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
var p1 = Proxy.revocable({}, proxy);
|
||||
p1.a = 3;
|
||||
assert(p1.a == 3);
|
||||
|
||||
var p2 = Proxy.revocable(proxy, {});
|
||||
p2.b = 43;
|
||||
assert(p2.b == 43);
|
||||
|
||||
assert(typeof(target.a) === "undefined");
|
||||
assert(typeof(target.b) === "undefined");
|
||||
|
||||
// Try accessing the "a" property again, it should fail
|
||||
try {
|
||||
Proxy.revocable({}, proxy);
|
||||
proxy.a;
|
||||
assert(false);
|
||||
} catch (e) {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
try {
|
||||
Proxy.revocable(proxy, {});
|
||||
assert(false);
|
||||
} catch (e) {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user