1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/proxy/bug901979-1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +// A proxy on the prototype chain of the global can't intercept lazy definition of globals. 1.5 +// Thanks to André Bargull for this one. 1.6 + 1.7 +var global = this; 1.8 +var status = "pass"; 1.9 +var handler = { 1.10 + get: function get(t, pk, r) { status = "FAIL get"; }, 1.11 + has: function has(t, pk) { status = "FAIL has"; } 1.12 +}; 1.13 +Object.prototype.__proto__ = new Proxy(Object.create(null), handler); 1.14 +Map; 1.15 +assertEq(status, "pass");