Skip to content

Commit b899e18

Browse files
rubennortefacebook-github-bot
authored andcommitted
Do not report mount for mount items with empty surfaceId (#53391)
Summary: Pull Request resolved: #53391 Changelog: [internal] Some mount items dispatched to Fabric don't have an associated surface ID (they use -1), which causes some log spam when we try to validate that the surface ID exist when we report mount for those surfaces. This checks if the surface ID has a valid surface ID before adding it to the list of surfaces to report mount. Reviewed By: rshest Differential Revision: D80698363 fbshipit-source-id: 63dc13d53b8bbc2742171b1f444c80ce867e2351
1 parent aec35b8 commit b899e18

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,7 @@ public void didMountItems(@Nullable List<? extends MountItem> mountItems) {
13721372
// Collect surface IDs for all the mount items
13731373
for (MountItem mountItem : mountItems) {
13741374
if (mountItem != null
1375+
&& mountItem.getSurfaceId() != View.NO_ID
13751376
&& !mSurfaceIdsWithPendingMountNotification.contains(mountItem.getSurfaceId())) {
13761377
mSurfaceIdsWithPendingMountNotification.add(mountItem.getSurfaceId());
13771378
}

0 commit comments

Comments
 (0)