Closed as not planned
Description
Line and column number in stack traces do not match with browser.
Take this code as an example
const a = {
b: {
C: {
extend: function extend() {
console.log(new Error().stack); // 5
}
}
}
}
a.b.C.extend({ // 12
init: function() {
console.log("init");
}
}); // 16
QuickJs:
at extend (/data/data/com.tns.testapplication/files/app/MyActivity.js:5:31)
at <anonymous> (/data/data/com.tns.testapplication/files/app/MyActivity.js:16:1) < call site
Browser:
extend@debugger eval code:5:27
@debugger eval code:12:7
- Browser records column/line at opening of function call while quickjs records it at closing line/column.
- Similarly browser records line/column for
new
call at the start ofnew
keyword while quickjs records it from the Class name. Incorrect column number in stack traces repro #236
I found a related PR that might address this issue: #406
Another example:
a.b.C.extend();
results in this stack in quickjs:
at extend (/data/data/com.tns.testapplication/files/app/MyActivity.js:5:31)
at <anonymous> (/data/data/com.tns.testapplication/files/app/MyActivity.js:12:1) < call site
while in browser it is consistent always at the start of function call.
Another one:
a.b.C.extend( // 12
// 13
); // 14
quickjs stack gives 14:1 as column number.
Metadata
Metadata
Assignees
Labels
No labels