forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtst.js
More file actions
38 lines (34 loc) · 679 Bytes
/
tst.js
File metadata and controls
38 lines (34 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var o = {
A: function f(x) {
'use strict';
// BAD
if (!(this instanceof arguments.callee))
// BAD
return new arguments.callee(x);
// BAD
console.log(f.caller);
// BAD
this.y = f.arguments;
this.x = x;
}
};
var D = class extends function() {
// BAD
return arguments.callee;
} {};
function g() {
// OK
return arguments.caller.length;
}
(function() {
'use strict';
function h() {
var foo = Math.random() > 0.5 ? h : arguments;
// BAD
return foo.caller;
}
})();
(function() {
'use strict';
arguments.caller; // OK - avoid duplicate alert from useless-expression
})();