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

Fix Error.stackTraceLimit = Infinity #861

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ammarahm-ed
Copy link

Closes #858

quickjs.c Show resolved Hide resolved
@ammarahm-ed
Copy link
Author

ammarahm-ed commented Jan 29, 2025

It seems that this works on mac but fails on Linux and Windows.

@saghul
Copy link
Contributor

saghul commented Jan 29, 2025

Yes it seems like you'll have to go back to explicitly testing for infinity.

@ammarahm-ed
Copy link
Author

@saghul can you start the tests again

quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
tests/bug858.js Outdated Show resolved Hide resolved
@ammarahm-ed
Copy link
Author

Hey @saghul I didn't look closely at your diff in review, fixed now and all tests now pass.

@saghul
Copy link
Contributor

saghul commented Jan 31, 2025

On a second thought, if we want to 100% mimic how v8 behaves we should store the JSValue and extract it when necessary.

Right now if you set it to -Infinity you'll get back 0, whereas Chrome gets you back the same value you set.

Thoughts @bnoordhuis ?

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.

Error.stackTraceLimit = Infinity results in empty stacktrace in errors.
3 participants