Skip to content

Conversation

@lunaleaps
Copy link

@lunaleaps lunaleaps commented Jun 6, 2023

Summary:

This is a cherry-pick of f2f1a2e onto rn/0.71-stable

Use the original Error.prototype.toString (as defined in ES2023 20.5.3.4) to format Error.stack. Also make sure a runaway recursion while formatting the stack does not bring the VM down. Finally, try to scrape any exceptions raised while formatting the stack trace so the user can get some information that an error happened (this last item leads to poor developer experience when there is an infinite recursion while formatting the stack).

Reviewed By: newobj

Differential Revision: D44258504

fbshipit-source-id: 772ae8225bfb1128cc6abadea75f5163714e70a5

Summary

There was a cp conflict where test/hermes/regress-error-capture-stack-trace-native-constructor.js doesn't exist in rn/0.71-stable.

I wasn't sure how to run the tests to ensure this doesn't break

Motivation is: reactwg/react-native-releases#69

Summary:
Use the original Error.prototype.toString (as defined in ES2023 20.5.3.4)
to format Error.stack. Also make sure a runaway recursion while formatting
the stack does not bring the VM down. Finally, try to scrape any exceptions
raised while formatting the stack trace so the user can get some
information that an error happened (this last item leads to poor developer
experience when there is an infinite recursion while formatting the stack).

Reviewed By: newobj

Differential Revision: D44258504

fbshipit-source-id: 772ae8225bfb1128cc6abadea75f5163714e70a5
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 6, 2023
@lunaleaps lunaleaps closed this Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants