Commit 821045a
Do not synchronize on java.lang.Boolean. (#56196)
Summary:
## Summary: Do not synchronize on java.lang.Boolean.
Once JEP 401 is implemented synchronization on
value classes (which box classes are) will throw IdentityException.
In general synchronization on 1) mutable field 2) box class is
inefficient (instances are shared) at best and a bug at worst case
as synchronization is done holding different monitors (it might be
fine, but is hard to reason about).
## Changelog:
[ANDROID] [FIXED] Use explicit `ReactInstanceManager.mHasStartedDestroyingLock` instead of using `ReactInstanceManager.mHasStartedDestroying`
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: #56196
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D110168816
Pulled By: javache
fbshipit-source-id: dae081dc00a94859f19dcc3607971a9c3d6fbd441 parent 36f69ef commit 821045a
1 file changed
Lines changed: 5 additions & 4 deletions
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
785 | | - | |
786 | | - | |
| 786 | + | |
| 787 | + | |
787 | 788 | | |
788 | 789 | | |
789 | 790 | | |
| |||
1139 | 1140 | | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | | - | |
| 1143 | + | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | | - | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
| |||
0 commit comments