fix some rough edges around stack traces

hide irrelevant CallFrames
fix span info for the implicit stack frame
This commit is contained in:
りき萌 2025-06-25 21:10:54 +02:00
parent e49885c83a
commit 7a52dbebd0
4 changed files with 34 additions and 11 deletions

View file

@ -280,7 +280,9 @@ class ErrorException extends HTMLElement {
}
};
for (let i = 0; i < this.result.stackTrace.length; ++i) {
// Iterate in reverse to let uppermost stack frames "win" and overwrite bottommost stack
// frames' colouring.
for (let i = this.result.stackTrace.length - 1; i >= 0; i--) {
let frame = this.result.stackTrace[i];
if (frame.span != null) {
diagnostics.push({