Add proxy support for HasBinding operation for Object Environment records (#3731)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -104,3 +104,24 @@ with (a) {
|
||||
assert(foo === 1);
|
||||
assert(typeof bar === "undefined");
|
||||
}
|
||||
|
||||
let track = [];
|
||||
let proxy = new Proxy({ a : 4, [Symbol.unscopables] : [] }, {
|
||||
has (t, p) {
|
||||
track.push(p);
|
||||
return Reflect.has(...arguments);
|
||||
},
|
||||
get (t, p, r) {
|
||||
track.push(p);
|
||||
return Reflect.get(...arguments);
|
||||
}
|
||||
});
|
||||
|
||||
with (proxy){
|
||||
a;
|
||||
}
|
||||
|
||||
assert(track.length == 3);
|
||||
assert(track[0] === 'a');
|
||||
assert(track[1] === Symbol.unscopables);
|
||||
assert(track[2] === 'a');
|
||||
|
||||
Reference in New Issue
Block a user