summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/self-hosting/object-lookup-hazard.js
blob: 5197a9113d767c0d547ed44b8d61701f84673b40 (plain)
1
2
3
4
5
6
7
8
// We shouldn't do the wrong thing in the face of an evil Object.prototype

Object.prototype.get = function() {};
assertEq(({a: 1}).__lookupGetter__("a"), undefined);
delete Object.prototype.get;

Object.prototype.set = function() {};
assertEq(({a: 1}).__lookupSetter__("a"), undefined);