Skip to content

Commit

Permalink
Make RCTCxxBridgeDelegate not care about return value of jsExecutorFa…
Browse files Browse the repository at this point in the history
…ctoryForBridge
  • Loading branch information
sjchmiela committed Aug 25, 2020
1 parent e70e6ba commit d485e41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ - (void)start
if (!self.executorClass) {
if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) {
id<RCTCxxBridgeDelegate> cxxDelegate = (id<RCTCxxBridgeDelegate>)self.delegate;
executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self];
executorFactory = std::make_shared<JSCExecutorFactory>(*reinterpret_cast<JSCExecutorFactory *>([cxxDelegate jsExecutorFactoryForBridge:self]));
}
if (!executorFactory) {
executorFactory = std::make_shared<JSCExecutorFactory>(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion React/CxxBridge/RCTCxxBridgeDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ class JSExecutorFactory;
* If not implemented, or returns an empty pointer, JSIExecutorFactory
* will be used with a JSCRuntime.
*/
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge;
- (void *)jsExecutorFactoryForBridge:(RCTBridge *)bridge;

@end

0 comments on commit d485e41

Please sign in to comment.