summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug634590.js
blob: 32df4f3bd85d015dcb5c78aa7533e0d283703502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
this.name = "outer";
var sb = evalcx('');
sb.name = "inner";
sb.parent = this;
function f() { return this.name; }
assertEq(evalcx('this.f = parent.f;\n' +
                'var s = "";\n' +
                'for (i = 0; i < 10; ++i)\n' +
                '  s += f();\n' +
                's',
                sb),
	 "outerouterouterouterouterouterouterouterouterouter");