Skip to content

Commit c1c976f

Browse files
sjchmielaKudo
authored andcommitted
Make RCTCxxBridgeDelegate not care about return value of jsExecutorFactoryForBridge
1 parent 742c984 commit c1c976f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

React/CxxBridge/RCTCxxBridge.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ - (void)start
394394
if (!self.executorClass) {
395395
if ([self.delegate conformsToProtocol:@protocol(RCTCxxBridgeDelegate)]) {
396396
id<RCTCxxBridgeDelegate> cxxDelegate = (id<RCTCxxBridgeDelegate>)self.delegate;
397-
executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self];
397+
executorFactory = std::make_shared<JSCExecutorFactory>(*reinterpret_cast<JSCExecutorFactory *>([cxxDelegate jsExecutorFactoryForBridge:self]));
398398
}
399399
if (!executorFactory) {
400400
auto installBindings = RCTJSIExecutorRuntimeInstaller(nullptr);

React/CxxBridge/RCTCxxBridgeDelegate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ class JSExecutorFactory;
2828
* If not implemented, or returns an empty pointer, JSIExecutorFactory
2929
* will be used with a JSCRuntime.
3030
*/
31-
- (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge;
31+
- (void *)jsExecutorFactoryForBridge:(RCTBridge *)bridge;
3232

3333
@end

0 commit comments

Comments
 (0)