Skip to content

Commit c6a9801

Browse files
committed
[js] Stop nqp::backtrace from returning frames for thunks
1 parent f93fbfa commit c6a9801

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vm/js/nqp-runtime/core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,12 @@ function backtrace(exception) {
14831483
if (ctx instanceof Ctx) {
14841484
ctx = ctx.$$skipHandlers();
14851485
const codeRef = ctx.codeRef();
1486+
1487+
if (codeRef && codeRef.staticCode.isThunk) {
1488+
ctx = ctx.$$caller;
1489+
continue;
1490+
}
1491+
14861492
if (codeRef !== null) {
14871493
const wanted = codeRef.$$call.name;
14881494
while (stackIndex < stack.length) {

0 commit comments

Comments
 (0)