1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
var res; var x = 0; function f() { x = {x: 1, f: function() { res = this.x; }}; with(x) { g = function() { eval(""); f(); } g(); } } f(); assertEq(res, 1);