Skip to content

Commit

Permalink
Make RCTCxxBridge not care about the actual protocol implemented, onl…
Browse files Browse the repository at this point in the history
…y the method used
  • Loading branch information
sjchmiela committed Aug 25, 2020
1 parent d485e41 commit a81120e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ - (void)start
// Prepare executor factory (shared_ptr for copy into block)
std::shared_ptr<JSExecutorFactory> executorFactory;
if (!self.executorClass) {
if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) {
if ([self.delegate respondsToSelector:@selector(jsExecutorFactoryForBridge:)]) {
id<RCTCxxBridgeDelegate> cxxDelegate = (id<RCTCxxBridgeDelegate>)self.delegate;
executorFactory = std::make_shared<JSCExecutorFactory>(*reinterpret_cast<JSCExecutorFactory *>([cxxDelegate jsExecutorFactoryForBridge:self]));
}
Expand Down

0 comments on commit a81120e

Please sign in to comment.