Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 "use strict";
3 let global = this;
4 let p = {};
5 let q = {};
7 let g1 = function() {
8 assertEq(this, undefined);
9 };
10 g1(...[]);
12 let g2 = x => {
13 assertEq(this, global);
14 };
15 g2(...[]);
17 let g3 = function() {
18 assertEq(this, p);
19 };
20 g3.apply(p, ...[]);
21 g3.call(p, ...[]);
23 g2.apply(p, ...[]);
24 g2.call(p, ...[]);
26 let o = {
27 f1: function() {
28 assertEq(this, o);
30 let g1 = function() {
31 assertEq(this, undefined);
32 };
33 g1(...[]);
35 let g2 = x => {
36 assertEq(this, o);
37 };
38 g2(...[]);
40 let g3 = function() {
41 assertEq(this, q);
42 };
43 g3.apply(q, ...[]);
44 g3.call(q, ...[]);
46 let g4 = x => {
47 assertEq(this, o);
48 };
49 g4.apply(q, ...[]);
50 g4.call(q, ...[]);
51 },
52 f2: x => {
53 assertEq(this, global);
54 let g1 = function() {
55 assertEq(this, undefined);
56 };
57 g1(...[]);
59 let g2 = x => {
60 assertEq(this, global);
61 };
62 g2(...[]);
64 let g3 = function() {
65 assertEq(this, q);
66 };
67 g3.apply(q, ...[]);
68 g3.call(q, ...[]);
70 let g4 = x => {
71 assertEq(this, global);
72 };
73 g4.apply(q, ...[]);
74 g4.call(q, ...[]);
75 },
76 f3: function() {
77 assertEq(this, p);
79 let g1 = function() {
80 assertEq(this, undefined);
81 };
82 g1(...[]);
84 let g2 = x => {
85 assertEq(this, p);
86 };
87 g2(...[]);
89 let g3 = function() {
90 assertEq(this, q);
91 };
92 g3.apply(q, ...[]);
93 g3.call(q, ...[]);
95 let g4 = x => {
96 assertEq(this, p);
97 };
98 g4.apply(q, ...[]);
99 g4.call(q, ...[]);
100 }
101 };
102 o.f1(...[]);
103 o.f2(...[]);
104 o.f3.apply(p, ...[]);
105 o.f2.apply(p, ...[]);