Skip to content

Commit

Permalink
Add extraModulesForBridge impl to instance
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjhughes committed Sep 27, 2024
1 parent 04eeb55 commit b9290f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-native/React/CoreModules/RCTPerfMonitor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ - (void)show

[self updateStats];

[RCTKeyWindow() addSubview:self.container];
UIWindow *window = RCTSharedApplication().delegate.window;
[window addSubview:self.container];

_uiDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(threadUpdate:)];
[_uiDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ - (void)registerSegmentWithId:(NSNumber *)segmentId path:(NSString *)path

#pragma mark - RCTTurboModuleManagerDelegate

- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
if ([_appTMMDelegate respondsToSelector:@selector(extraModulesForBridge:)]) {
return [_appTMMDelegate extraModulesForBridge:bridge];
}
return @[];
}

- (Class)getModuleClassFromName:(const char *)name
{
if ([_appTMMDelegate respondsToSelector:@selector(getModuleClassFromName:)]) {
Expand Down

0 comments on commit b9290f8

Please sign in to comment.