mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
Move batchedbridge start out of init
Reviewed By: javache Differential Revision: D3913304 fbshipit-source-id: 7d9b5b352d95dd770757cc99dddcce510cdd4909
This commit is contained in:
parent
971cda8794
commit
51df83d7d5
@ -80,12 +80,6 @@ typedef NS_ENUM(NSUInteger, RCTBridgeFields) {
|
||||
_displayLink = [RCTDisplayLink new];
|
||||
|
||||
[RCTBridge setCurrentBridge:self];
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:RCTJavaScriptWillStartLoadingNotification
|
||||
object:_parentBridge userInfo:@{@"bridge": self}];
|
||||
|
||||
[self start];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -97,6 +91,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
||||
|
||||
- (void)start
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName:RCTJavaScriptWillStartLoadingNotification
|
||||
object:_parentBridge userInfo:@{@"bridge": self}];
|
||||
|
||||
RCT_PROFILE_BEGIN_EVENT(0, @"-[RCTBatchedBridge setUp]", nil);
|
||||
|
||||
dispatch_queue_t bridgeQueue = dispatch_queue_create("com.facebook.react.RCTBridgeQueue", DISPATCH_QUEUE_CONCURRENT);
|
||||
|
@ -80,6 +80,11 @@ RCT_EXTERN void RCTVerifyAllModulesExported(NSArray *extraModules);
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL moduleSetupComplete;
|
||||
|
||||
/**
|
||||
* Called on the child bridge to run the executor and start loading.
|
||||
*/
|
||||
- (void)start;
|
||||
|
||||
/**
|
||||
* Used by RCTModuleData to register the module for frame updates after it is
|
||||
* lazily initialized.
|
||||
@ -142,5 +147,6 @@ RCT_EXTERN void RCTVerifyAllModulesExported(NSArray *extraModules);
|
||||
@property (nonatomic, assign, readonly) BOOL moduleSetupComplete;
|
||||
|
||||
- (instancetype)initWithParentBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
||||
- (void)start;
|
||||
|
||||
@end
|
||||
|
@ -296,6 +296,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
|
||||
|
||||
[self createBatchedBridge];
|
||||
[self.batchedBridge start];
|
||||
|
||||
RCT_PROFILE_END_EVENT(RCTProfileTagAlways, @"");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user