Skip to content

Disable console-eager-eval and Live Expressions panel #164

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

huntie
Copy link
Member

@huntie huntie commented May 23, 2025

Summary

This is a mitigation for S523384, affecting builds of react-native-devtools-frontend shipped React Native 0.78 and onwards.

Unfortunately, Hermes doesn't yet correctly implement CDP's Runtime.evaluate#throwOnSideEffect, and so we cannot safely use eager evaluation. Currently, this can cause erratic and unsafe console behaviour while typing.

🚧 We intend to restore this feature when we can, but it will require a future Hermes release.

Test plan

Before

Screenshot 2025-05-23 at 11 24 54
  • ℹ️ "Eager evaluation" setting available
  • ℹ️ Live Expression toggle + panel available
  • ❌ Console statements eagerly evaluate with side effects

After

image
  • ✅ All features disabled
  • ✅ Console statements do not eagerly evaluate with side effects

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

This is a mitigation for S523384, affecting builds of react-native-devtools-frontend shipped React Native 0.78 and onwards.

Unfortunately, Hermes doesn't yet correctly implement CDP's `Runtime.evaluate#throwOnSideEffect`, and so we cannot safely use eager evaluation. Currently, this can cause erratic console behaviour while typing.
@huntie huntie force-pushed the S523384-mitigation branch from f0e5922 to 1280e5f Compare May 23, 2025 10:44
@huntie huntie marked this pull request as ready for review May 23, 2025 10:47
@huntie huntie requested review from motiz88 and hoxyq May 23, 2025 10:50
Copy link

@motiz88 motiz88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable as a mitigation.

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

Successfully merging this pull request may close these issues.

3 participants