Debian Codegraph @

js/src/jit-test/tests/self-hosting/object-lookup-hazard.js

raw
1 // We shouldn't do the wrong thing in the face of an evil Object.prototype
2
3 Object.prototype.get = function() {};
4 assertEq(({a: 1}).__lookupGetter__("a"), undefined);
5 delete Object.prototype.get;
6
7 Object.prototype.set = function() {};
8 assertEq(({a: 1}).__lookupSetter__("a"), undefined);