Repository navigation
Commit 57c7f89
committed
Pull the coordinator that reported a transaction, as iOS does, in the Android pull model
With enableMountingCoordinatorPullModelAndroid, a commit tells Java only its surface id, and the UI thread looked the surface's MountingCoordinator up in the binding's surface registry. Commits a surface makes while it starts or stops, when it is not in the registry, were not mounted, and the legacy stopSurface(int) deadlocked on the registry lock.
The commit now keeps the MountingCoordinator that reported it until the UI thread pulls, and pullAndExecuteTransaction pulls from it, as iOS pulls from the coordinator its main-queue block captures. If a surface is restarted with the same id while the previous surface's commit waits to be pulled, the latest coordinator wins and a warning is logged. Java does not mount such a restarted surface anyway (MountingManager.startSurface keeps the stopped one). The registry and the push model are unchanged.1 parent 4a31469 commit 57c7f89
2 files changed
Lines changed: 23 additions & 23 deletions
File tree
- packages/react-native/ReactAndroid/src/main/jni/react/fabric
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 133 | + | |
151 | 134 | | |
152 | 135 | | |
153 | 136 | | |
| |||
732 | 715 | | |
733 | 716 | | |
734 | 717 | | |
735 | | - | |
736 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
737 | 731 | | |
738 | 732 | | |
739 | 733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| |||
0 commit comments