i was doing some testing and noticed that some buildin's are not properly preserved,
function b() {
var passed = false;
var proxy = new Proxy({}, {
getOwnPropertyDescriptor() {
passed = true;
return undefined;
}
});
Object.getOwnPropertyDescriptor(proxy, "foo"); // this is removed
return passed;
}
b();
Object.getOwnPropertyDescriptor(proxy, "foo"); is removed
looks like this issue is also present for other Object accessors:
- Object.hasOwn
- Object.getOwnPropertyDescriptor
after further investigation, issue seem to be with how we deal with Proxy as a whole
function b() {
var passed = false;
var proxy = new Proxy({}, {
ownKeys() {
passed = true;
return [];
}
});
Object.keys(proxy); // this is removed
return passed;
}
b();
i was doing some testing and noticed that some buildin's are not properly preserved,
Object.getOwnPropertyDescriptor(proxy, "foo");is removedlooks like this issue is also present for other Object accessors:
after further investigation, issue seem to be with how we deal with
Proxyas a whole