Skip to content

Make callable module lookup prototype-safe - #58199

Open
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/fix-message-queue-prototype-modules
Open

Make callable module lookup prototype-safe#58199
OskarEichler wants to merge 1 commit into
react:mainfrom
OskarEichler:codex/fix-message-queue-prototype-modules

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary:

The legacy bridge stores lazy callable modules in an ordinary object. Unregistered names such as constructor therefore resolve through Object.prototype, while registering __proto__ mutates the registry prototype. Store the internal string-keyed module map without a prototype and add exact lookup/registration regressions.

Fixes #58198.

Changelog:

[GENERAL] [FIXED] - Prevent inherited Object properties from resolving as legacy callable modules.

Test Plan:

  • Exact Fantom baseline: 1 failed / 13 passed (constructor returned an inherited object).
  • Fixed Hermes Fantom: 14/14 passed, including __proto__ registration.
  • Fresh yarn flow-check: 0 errors.
  • Targeted ESLint, Prettier, and git diff --check passed.

The one-time local Fantom native build required -Wno-error=deprecated-literal-operator for a vendored nlohmann header under the installed Xcode Clang; the test execution itself is green. No UI change; screenshots are not applicable.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MessageQueue resolves inherited Object properties as callable modules

1 participant