mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Ignore strict-mode-call-stack-introspection for expr stmts
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
| tst.js:5:30:5:45 | arguments.callee | Strict mode code cannot use arguments.callee. |
|
||||
| tst.js:7:21:7:36 | arguments.callee | Strict mode code cannot use arguments.callee. |
|
||||
| tst.js:9:20:9:27 | f.caller | Strict mode code cannot use Function.prototype.caller. |
|
||||
| tst.js:11:8:11:18 | f.arguments | Strict mode code cannot use Function.prototype.arguments. |
|
||||
| tst.js:18:3:18:18 | arguments.callee | Strict mode code cannot use arguments.callee. |
|
||||
| tst.js:31:5:31:14 | foo.caller | Strict mode code cannot use Function.prototype.caller. |
|
||||
| tst.js:31:5:31:14 | foo.caller | Strict mode code cannot use arguments.caller. |
|
||||
| tst.js:11:17:11:27 | f.arguments | Strict mode code cannot use Function.prototype.arguments. |
|
||||
| tst.js:18:10:18:25 | arguments.callee | Strict mode code cannot use arguments.callee. |
|
||||
| tst.js:31:12:31:21 | foo.caller | Strict mode code cannot use Function.prototype.caller. |
|
||||
| tst.js:31:12:31:21 | foo.caller | Strict mode code cannot use arguments.caller. |
|
||||
|
||||
@@ -8,14 +8,14 @@ var o = {
|
||||
// BAD
|
||||
console.log(f.caller);
|
||||
// BAD
|
||||
f.arguments;
|
||||
this.y = f.arguments;
|
||||
this.x = x;
|
||||
}
|
||||
};
|
||||
|
||||
var D = class extends function() {
|
||||
// BAD
|
||||
arguments.callee;
|
||||
return arguments.callee;
|
||||
} {};
|
||||
|
||||
function g() {
|
||||
@@ -28,6 +28,11 @@ function g() {
|
||||
function h() {
|
||||
var foo = Math.random() > 0.5 ? h : arguments;
|
||||
// BAD
|
||||
foo.caller;
|
||||
return foo.caller;
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
arguments.caller; // OK - avoid duplicate alert from useless-expression
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user