Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getCallSites(skip) {
const limit = Error.stackTraceLimit;
Error.stackTraceLimit = limit + skip;
const stack = chain.callSite({
extend: false,
filter: true,
slice: skip
});
Error.stackTraceLimit = limit;
return stack;
}
AsyncWrap.prototype.stackTrace = function (skip) {
const limit = Error.stackTraceLimit;
const slice = skip + this.skip;
Error.stackTraceLimit = limit + slice;
const stack = chain.callSite({
extend: false,
filter: true,
slice: slice
});
Error.stackTraceLimit = limit;
return stack;
};
function getCallSites(skip) {
const limit = Error.stackTraceLimit;
Error.stackTraceLimit = limit + skip;
const stack = chain.callSite({
extend: false,
filter: true,
slice: skip
});
Error.stackTraceLimit = limit;
return stack;
}
AsyncWrap.prototype.stackTrace = function (skip) {
const limit = Error.stackTraceLimit;
const slice = skip + this.skip;
Error.stackTraceLimit = limit + slice;
const stack = chain.callSite({
extend: false,
filter: true,
slice: slice
});
Error.stackTraceLimit = limit;
return stack;
};