Skip to content

feat(hermes): add pr2046 class-in-finally var caching patch#51

Merged
ramonclaudio merged 2 commits into
mainfrom
feat/hermes-pr2046
Jun 4, 2026
Merged

feat(hermes): add pr2046 class-in-finally var caching patch#51
ramonclaudio merged 2 commits into
mainfrom
feat/hermes-pr2046

Conversation

@ramonclaudio

Copy link
Copy Markdown
Owner

Add the hermes source patch for facebook/hermes#2046, a cherry-pick of 1e94fbe0eb onto the 250829098.0.0-stable branch React Native 0.85 ships.

A finally block emits its body twice. On the second emission, legacy class compilation built fresh internal Variables (class/prototype vars, the instance-element init function, computed field keys, private brands) while cached functions reached via findCompiledEntity still referenced the originals, miscompiling classes declared in finally. The cherry-pick caches them in a LegacyClassVars struct keyed by the class AST node and emits private-brand stores unconditionally.

Source-level replacement for the class-in-finally workaround dropped with @react-native/babel-preset #56816. Apply with git apply against a facebook/hermes V1 checkout. Root cause facebook/hermes#1761.

  • add packages/hermes/hermes-pr2046.patch
  • add the hermes row to the Open table

@ramonclaudio ramonclaudio changed the base branch from feat/hermes-pr2045 to main June 4, 2026 20:13
@ramonclaudio ramonclaudio merged commit bb48395 into main Jun 4, 2026
@ramonclaudio ramonclaudio deleted the feat/hermes-pr2046 branch June 4, 2026 20:14
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