blob: d449de00686efe2ad576df3758030f1f23396114 [file] [log] [blame]
keith_miller@apple.comd1a5d2f2016-05-02 17:38:15 +00001function test() {
2 return this.f;
3}
4noInline(test);
5
6function test2() {
7 "use strict";
8 return this.f;
9}
10noInline(test2);
11
12f = 42;
13
14let get = eval;
15let global = get("this");
16
17for (var i = 0; i < 10000; ++i) {
18 let result = test.call(global);
19 if (result !== 42)
20 throw new Error("bad this value: " + result);
21
22 result = test2.call(global);
23 if (result !== 42)
24 throw new Error("bad this value: " + result);
25}