[iOS] Reland: avoid race condition crash in [RCTDataRequestHandler invalidate#50342
Closed
zhongwuzw wants to merge 1 commit intofacebook:mainfrom
Closed
[iOS] Reland: avoid race condition crash in [RCTDataRequestHandler invalidate#50342zhongwuzw wants to merge 1 commit intofacebook:mainfrom
zhongwuzw wants to merge 1 commit intofacebook:mainfrom
Conversation
Contributor
|
@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Collaborator
|
This pull request was successfully merged by @zhongwuzw in 44810f7 When will my fix make it into a release? | How to file a pick request? |
Saadnajmi
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
pushed a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 31, 2025
…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
added a commit
to microsoft/react-native-macos
that referenced
this pull request
Apr 8, 2025
…aRequestHandler invalidate]" (#2450) Cherry pick facebook#50342 , which fixes a bug with our fix from #2383 I chose to omit the macOS tags as this is a cherry-pick. Co-authored-by: zhongwuzw <zhongwuzw@qq.com>
Saadnajmi
pushed a commit
to microsoft/react-native-macos
that referenced
this pull request
Apr 8, 2025
…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
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:
Reland 6bc5dde, the reason the previous commit has an issue is
weakOpwould alwaysnilwhen captured in block :react-native/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm
Lines 52 to 54 in 6bc5dde
Now, we can create an
NSBlockOperationand useaddExecutionBlockinstead.weakOpcan be captured correctly.Changelog:
[IOS] [FIXED] - Reland: avoid race condition crash in [RCTDataRequestHandler invalidate
Test Plan:
N/A