Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call Error.prepareStackTrace on new Error().stack #5802

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

Previously, Bun was only calling Error.prepareStackTrace when Error.captureStackTrace was called. This broke a lot of packages.

This makes Bun call Error.prepareStackTrace whenever it's defined, and also makes it very slightly faster to check for the existence of `Error.prepareStackTrace.

How did you verify your code works?

There are tests.

@Jarred-Sumner
Copy link
Collaborator Author

Fixes #4606
Fixes #4591
Fixes #4742
Fixes #4324

@Jarred-Sumner
Copy link
Collaborator Author

Fixes #4280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant