Skip to content

fix(0.76): cherry pick "[iOS] Reland: avoid race condition crash in [RCTDataRequestHandler invalidate]" #2453

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 2 commits into from
Apr 8, 2025

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Mar 31, 2025

Backport #2450 to 0.76-stable

…te (facebook#50342)

Summary:
Reland facebook@6bc5dde, the reason the previous commit has an issue is `weakOp` would always `nil` when captured in block :https://github.com/facebook/react-native/blob/6bc5ddea3ea3ca20060ea0181630539931948085/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm#L52-L54

Now, we can create an `NSBlockOperation` and use `addExecutionBlock` instead. `weakOp` can be captured correctly.

[IOS] [FIXED] - Reland: avoid race condition crash in [RCTDataRequestHandler invalidate

Pull Request resolved: facebook#50342

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D72047232

Pulled By: javache

fbshipit-source-id: c3a5a9fca909f7eac16d78b650c9ea9f5b8e64e4
@Saadnajmi Saadnajmi requested a review from a team as a code owner March 31, 2025 17:59
@Saadnajmi Saadnajmi merged commit 2c5e648 into microsoft:0.76-stable Apr 8, 2025
8 of 10 checks passed
@Saadnajmi Saadnajmi deleted the strongop-76 branch April 8, 2025 22:48
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.

3 participants