Backtrace API Proposal #4705
Replies: 2 comments 4 replies
-
|
What about the fact that |
Beta Was this translation helpful? Give feedback.
-
|
another thing worth considering is potential cases for sourcemaps that may be provided for bundled, or transpiled JS code, or WASM modules down the line. most likely, we'd want the source mapped code locations to appear in our backtraces as opposed to bundled code - in many cases, some JS modules may even be entirely virtual (e.g. produced by a module resolver at runtime for transpilation purposes) - in this case, most users would want or expect the source locations to be representative of their source code. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Research Summary
Every engine exposes the same core per-frame info:
V8 goes further with its
CallSiteAPI (16 methods) includingisNative(),isEval(),isConstructor(),isAsync(),getThis(),getFunction(), etc.SpiderMonkey & JSC only expose a formatted string - no structured API at all.
TC39 has proposals for structured stack frames but nothing past Stage 1-2 yet.
Proposal
For Boa's Rust-side API, the sensible minimum that matches what
ShadowEntryalready has is basically:That's the universal common denominator across all engines. Boa's
ShadowEntryalready has all of this - it just needs to be made public (or wrapped in a clean public type). There's really nothing to bikeshed here - the shape is obvious and matches the industry standard.Beta Was this translation helpful? Give feedback.
All reactions