mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Attempt to fix a crash in RCTMountingTransactionObserverCoordinator
Summary: We see a quite small but probably dangerous crash in RCTMountingTransactionObserverCoordinator, it's unclear why exactly it happens but seems it's somehow connected with a shape of RCTComponentViewDescriptor struct. Specifying storage attribute (`__strong`) correctly/explicitly might fix the issue. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18567763 fbshipit-source-id: 57d9f96c4609a38ddf44ce02df53f2d713dfb116
This commit is contained in:
committed by
Facebook Github Bot
parent
6db52c5fe0
commit
83f0210cee
@@ -21,7 +21,7 @@ class RCTComponentViewDescriptor final {
|
||||
/*
|
||||
* Associated (and owned) native view instance.
|
||||
*/
|
||||
UIView<RCTComponentViewProtocol> *view;
|
||||
__strong UIView<RCTComponentViewProtocol> *view = nil;
|
||||
|
||||
/*
|
||||
* Indicates a requirement to call on the view methods from
|
||||
|
||||
@@ -46,7 +46,7 @@ static void RNDeleteMountInstruction(
|
||||
SurfaceId surfaceId)
|
||||
{
|
||||
auto const &oldChildShadowView = mutation.oldChildShadowView;
|
||||
RCTComponentViewDescriptor componentViewDescriptor = [registry componentViewDescriptorWithTag:oldChildShadowView.tag];
|
||||
auto const &componentViewDescriptor = [registry componentViewDescriptorWithTag:oldChildShadowView.tag];
|
||||
observerCoordinator.unregisterViewComponentDescriptor(componentViewDescriptor, surfaceId);
|
||||
[registry enqueueComponentViewWithComponentHandle:oldChildShadowView.componentHandle
|
||||
tag:oldChildShadowView.tag
|
||||
|
||||
Reference in New Issue
Block a user