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

Implement Error.prepareStackTrace support #223

Merged
merged 1 commit into from Dec 19, 2023
Merged

Conversation

saghul
Copy link
Contributor

@saghul saghul commented Dec 17, 2023

Based on V8's API: https://v8.dev/docs/stack-trace-api.

Bits picked from Frida: frida/quickjs@78fd25f

Closes: #134

@saghul
Copy link
Contributor Author

saghul commented Dec 17, 2023

@bnoordhuis Can you PTAL? It's not fully finished yet (see TODOs) but I'd like some feedback on the approach.

The tricky part was to avoid doing anything while iterating through the stack frames since they could get modified while we are iterating over them.

Edit: also, do you reckon there is more low hanging fruit I could add, to make the API closer to V8's?

quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Outdated Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
@saghul saghul marked this pull request as ready for review December 19, 2023 08:39
@saghul
Copy link
Contributor Author

saghul commented Dec 19, 2023

Alright, this is one is ready now, PTAL @bnoordhuis !

quickjs.c Show resolved Hide resolved
quickjs.c Show resolved Hide resolved
@saghul saghul merged commit 555d837 into master Dec 19, 2023
31 checks passed
@saghul saghul deleted the error-prepareStackTrace branch December 19, 2023 14:36
@saghul
Copy link
Contributor Author

saghul commented Dec 19, 2023

🔥

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.

Add Error.prepareStackTrace support
3 participants