diff options
| author | 2022-03-11 03:09:57 -0800 | |
|---|---|---|
| committer | 2022-03-11 03:09:57 -0800 | |
| commit | 313ad01e4213f0297221fef0c2ba454244b40c55 (patch) | |
| tree | 0777573f29507b230ec5e9096c3d6c58934bf62c /packages/bun-error/index.tsx | |
| parent | 44b0c8153a7092f97c36c5aab82b692f672c3ddf (diff) | |
| download | bun-313ad01e4213f0297221fef0c2ba454244b40c55.tar.gz bun-313ad01e4213f0297221fef0c2ba454244b40c55.tar.zst bun-313ad01e4213f0297221fef0c2ba454244b40c55.zip | |
fix bug with freeing typed arrays
Diffstat (limited to 'packages/bun-error/index.tsx')
| -rw-r--r-- | packages/bun-error/index.tsx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/packages/bun-error/index.tsx b/packages/bun-error/index.tsx index 9b367c2ef..05c378f8f 100644 --- a/packages/bun-error/index.tsx +++ b/packages/bun-error/index.tsx @@ -17,7 +17,12 @@ import { problemsToMarkdown, withBunInfo, } from "./markdown"; -import { fetchMappings, remapPosition, sourceMappings } from "./sourcemap"; +import { + fetchAllMappings, + fetchMappings, + remapPosition, + sourceMappings, +} from "./sourcemap"; export enum StackFrameScope { Eval = 1, @@ -1319,13 +1324,15 @@ export function renderRuntimeError(error: Error) { // But! If we've already fetched the source mappings in this page load before // Rely on the cached ones // and don't fetch them again - const framePromises = exception.stack.frames + const framePromises = fetchAllMappings( + exception.stack.frames.map((frame) => + normalizedFilename(frame.file, thisCwd) + ), + signal + ) .map((frame, i) => { if (stopThis.stopped) return null; - return [ - fetchMappings(normalizedFilename(frame.file, thisCwd), signal), - i, - ]; + return [frame, i]; }) .map((result) => { if (!result) return; |
