Commit dabb434
Fix RetryableMountingLayerException crash in updateOverflowInset (#56762)
Summary:
Pull Request resolved: #56762
Fix a crash in `SurfaceMountingManager.updateOverflowInset()` where `getViewState()` throws `RetryableMountingLayerException` when the view state for a tag is not found in the registry.
The crash occurs during batch mount item execution when an `updateOverflowInset` operation references a view tag that has been removed from the registry due to normal lifecycle race conditions. The surface is still active (not stopped), but the view has already been deleted.
The fix replaces `getViewState(reactTag)` (which throws) with `getNullableViewState(reactTag)` + null check + soft exception logging + early return. This matches the defensive pattern already used by peer methods in the same class: `updateLayout`, `addViewAt`, and `removeViewAt`.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D104400233
fbshipit-source-id: 678df406079da98c0c2180766c936b5f2bb9fcf71 parent d80377c commit dabb434
1 file changed
Lines changed: 10 additions & 1 deletion
File tree
- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
902 | 911 | | |
903 | 912 | | |
904 | 913 | | |
| |||
0 commit comments