You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I've found the problem. The __hasInstance__ method on Function.prototype is defined thusly:
definitions.defineProperty(Fp, "__hasInstance__",
function (v) {
return v instanceof Function || v instanceof global.Function;
}, true, true, true);
Host objects inherit this method. When, for example (new ReferenceError()) instanceof ReferenceError) is called, the __hasInstance__ defined above is called. Since (new ReferenceError()) is not an instanceof Function, false is incorrectly returned.
The fix is to define __hasInstance__ per the spec, as has been done for FunctionObject.prototype. I'll submit a pull request momentarily.
This returns false, but should return true:
I believe this has something to do with how objects from the host interpreter get wrapped with a Proxy.
The text was updated successfully, but these errors were encountered: