bug901979-1.js (485B)
1 // A proxy on the prototype chain of the global can't intercept lazy definition of globals. 2 // Thanks to André Bargull for this one. 3 load(libdir + "immutable-prototype.js"); 4 5 var global = this; 6 var status = "pass"; 7 var handler = { 8 get: function get(t, pk, r) { status = "FAIL get"; }, 9 has: function has(t, pk) { status = "FAIL has"; } 10 }; 11 12 if (globalPrototypeChainIsMutable()) 13 Object.prototype.__proto__ = new Proxy(Object.create(null), handler); 14 15 Map; 16 assertEq(status, "pass");