Skip to content

Add regression test for -[RCTBridgeProxy object] - #60533

Open
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D134530678
Open

christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D134530678

Conversation

@christophpurrer

@christophpurrer christophpurrer commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Summary:

Adds an XCTest that sends -object to a real RCTBridgeProxy and asserts that it does not throw and that it returns the proxy itself. RCTBridgeProxy is an NSProxy, so without this method the message falls through to doesNotRecognizeSelector: and the legacy view manager interop layer crashes. The test is a new RCTBridgeProxyTests file. It is picked up by the existing MountingTestsApple target, which already links RCTBridgeProxy, so no BUCK change is needed. -object is not in RCTBridgeProxy.h, so the test declares it in a test-local category. This is a test-only change.

The XCTest assertion block suppresses clang-tidy misc-throw-by-value-catch-by-reference, which fires inside the XCTAssertEqual macro expansion. The sibling RCTLegacyViewManagerInteropComponentDescriptorTests.mm suppresses the same check the same way.

Changelog: [Internal]

Signed-off-by: Racer Engineer noreply+893464919433493@fb.com

Differential Revision: D134530678

@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D134530678.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Visual regression

No visual differences at 89d47abd6994.

android: no capture

Summary:
## Summary:
Adds an XCTest that sends `-object` to a real `RCTBridgeProxy` and asserts that it does not throw and that it returns the proxy itself. `RCTBridgeProxy` is an `NSProxy`, so without this method the message falls through to `doesNotRecognizeSelector:` and the legacy view manager interop layer crashes. The test is a new `RCTBridgeProxyTests` file. It is picked up by the existing `MountingTestsApple` target, which already links `RCTBridgeProxy`, so no BUCK change is needed. `-object` is not in `RCTBridgeProxy.h`, so the test declares it in a test-local category. This is a test-only change.

The XCTest assertion block suppresses clang-tidy `misc-throw-by-value-catch-by-reference`, which fires inside the `XCTAssertEqual` macro expansion. The sibling `RCTLegacyViewManagerInteropComponentDescriptorTests.mm` suppresses the same check the same way.

Changelog: [Internal]

Signed-off-by: Racer Engineer <noreply+893464919433493@fb.com>

Differential Revision: D134530678

This branch has not been deployed

No deployments
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.

1 participant