[XSS] Include call stack in debugging log output.

This commit is contained in:
hackademix 2021-01-15 17:31:02 +01:00
parent 445d7ff1af
commit 10e02b41ed
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ XSS.InjectionChecker = (async () => {
if (msg) msg = this._printable(msg);
msg = `${msg} - TIME: ${this.timing.elapsed}`;
if (iterations) msg = `${msg} - ITER: ${iterations}`;
debug("[InjectionChecker]", msg);
debug("[InjectionChecker]", msg, new Error().stack);
},
_printable: function(msg) {
@ -57,7 +57,7 @@ XSS.InjectionChecker = (async () => {
},
log: function() {},
get logEnabled() {
return this.log == this._log;
return this.log === this._log;
},
set logEnabled(v) {
this.log = v ? this._log : function() {};