mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: More asserts in RCTMountingTransactionObserverCoordinator
Summary: Just asserts to be sure that we don't over-insert or over-erase to/from the collection. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18567732 fbshipit-source-id: 569dbce6e62380ae3a0716448ad10bf418aa4f9c
This commit is contained in:
committed by
Facebook Github Bot
parent
e4a23f72d5
commit
e6d566fcb9
@@ -21,6 +21,7 @@ void RCTMountingTransactionObserverCoordinator::registerViewComponentDescriptor(
|
||||
}
|
||||
|
||||
auto &surfaceRegistry = registry_[surfaceId];
|
||||
assert(surfaceRegistry.count(componentViewDescriptor) == 0);
|
||||
surfaceRegistry.insert(componentViewDescriptor);
|
||||
}
|
||||
|
||||
@@ -34,6 +35,7 @@ void RCTMountingTransactionObserverCoordinator::unregisterViewComponentDescripto
|
||||
}
|
||||
|
||||
auto &surfaceRegistry = registry_[surfaceId];
|
||||
assert(surfaceRegistry.count(componentViewDescriptor) == 1);
|
||||
surfaceRegistry.erase(componentViewDescriptor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user