Remove shadowview copy in setIsJSResponder

Summary:
Noticed we were copying ShadowView, where a reference should suffice.

Changelog: [Internal]

Reviewed By: appden

Differential Revision: D36455200

fbshipit-source-id: 2cd3cf66b9e5ec05bce9ce1d739fbed66f3a6d89
This commit is contained in:
Pieter De Baets
2022-05-19 11:48:02 -07:00
committed by Facebook GitHub Bot
parent 05aaba9514
commit baada4e299
3 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)setIsJSResponder:(BOOL)isJSResponder
blockNativeResponder:(BOOL)blockNativeResponder
forShadowView:(facebook::react::ShadowView)shadowView;
forShadowView:(facebook::react::ShadowView const &)shadowView;
- (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag
changedProps:(NSDictionary *)props
+3 -3
View File
@@ -282,11 +282,11 @@ static void RCTPerformMountInstructions(
- (void)setIsJSResponder:(BOOL)isJSResponder
blockNativeResponder:(BOOL)blockNativeResponder
forShadowView:(facebook::react::ShadowView)shadowView
forShadowView:(facebook::react::ShadowView const &)shadowView
{
ReactTag reactTag = shadowView.tag;
RCTExecuteOnMainQueue(^{
UIView<RCTComponentViewProtocol> *componentView =
[self->_componentViewRegistry findComponentViewWithTag:shadowView.tag];
UIView<RCTComponentViewProtocol> *componentView = [self->_componentViewRegistry findComponentViewWithTag:reactTag];
[componentView setIsJSResponder:isJSResponder];
});
}
+3 -5
View File
@@ -364,7 +364,7 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
NSString *commandStr = [[NSString alloc] initWithUTF8String:commandName.c_str()];
NSArray *argsArray = convertFollyDynamicToId(args);
[self->_mountingManager dispatchCommand:tag commandName:commandStr args:argsArray];
[_mountingManager dispatchCommand:tag commandName:commandStr args:argsArray];
}
- (void)schedulerDidSendAccessibilityEvent:(const facebook::react::ShadowView &)shadowView
@@ -373,16 +373,14 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
ReactTag tag = shadowView.tag;
NSString *eventTypeStr = [[NSString alloc] initWithUTF8String:eventType.c_str()];
[self->_mountingManager sendAccessibilityEvent:tag eventType:eventTypeStr];
[_mountingManager sendAccessibilityEvent:tag eventType:eventTypeStr];
}
- (void)schedulerDidSetIsJSResponder:(BOOL)isJSResponder
blockNativeResponder:(BOOL)blockNativeResponder
forShadowView:(facebook::react::ShadowView const &)shadowView;
{
[self->_mountingManager setIsJSResponder:isJSResponder
blockNativeResponder:blockNativeResponder
forShadowView:shadowView];
[_mountingManager setIsJSResponder:isJSResponder blockNativeResponder:blockNativeResponder forShadowView:shadowView];
}
- (void)addObserver:(id<RCTSurfacePresenterObserver>)observer