mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
After calling structuredClone() on an Error object, the error would lose its internal JSC stack trace. When console.error formatted the cloned error, it fell back to parsing the .stack string property. However, the V8-style stack trace parser would stop early when encountering frames without function names (e.g., top-level code execution frames). These anonymous frames are formatted as "at /path/to/file:line:column" without parentheses, which the parser previously treated as invalid and stopped parsing. This fix updates the V8StackTraceIterator to properly handle frames without function names by parsing them as anonymous frames with just the source location information.