Cherry-pick: Set home object correctly in object literal accessors#2045
Open
ramonclaudio wants to merge 1 commit into
Open
Cherry-pick: Set home object correctly in object literal accessors#2045ramonclaudio wants to merge 1 commit into
ramonclaudio wants to merge 1 commit into
Conversation
Summary: `genFunctionExpression` of an accessor was not setting the home object correctly. Reviewed By: avp Differential Revision: D86118531 fbshipit-source-id: a64afe938d61b7b210cc6eac68a561fc21aaba34 (cherry picked from commit 18a9634)
This was referenced Jun 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-pick of
18a9634659443c92d481efe71b0c2aea9e6c464bfromstatic_hto the250829098.0.0-stablebranch.genObjectExprpassesnullptras the home object when generating an object-literal getter or setter function, instead ofcapturedObj. Anysuper.<x>inside such an accessor then compiles against a null home object and SIGSEGVshermescat compile time. The regular-method path on this branch already passescapturedObj, so this makes accessors consistent with methods.This landed on
static_hafter the branch was cut (2025-08-29), so it is missing from the V1 line React Native ships (needed by react/react-native#56816). Authored by @fbmal7, reviewed internally by avp.Test plan
test/hermes/object-literal-getter-super.js.hermescfrom250829098.0.0-stable(517edaff8): the baseline compiler SIGSEGVs compiling an object literal withget x() { return super.y }. With this cherry-pick it compiles clean.LIT_FILTER="object-literal-getter-super" cmake --build build --target check-hermespasses.