@@ -98,6 +98,8 @@ - (instancetype)initWithParentBridge:(RCTBridge *)bridge
9898
9999- (void )start
100100{
101+ NSLog (@" RCTBatchedBridge <%p > setup" , self);
102+
101103 dispatch_queue_t bridgeQueue = dispatch_queue_create (" com.facebook.react.RCTBridgeQueue" , DISPATCH_QUEUE_CONCURRENT);
102104
103105 dispatch_group_t initModulesAndLoadSource = dispatch_group_create ();
@@ -141,8 +143,8 @@ - (void)start
141143
142144 // Asynchronously gather the module config
143145 dispatch_group_async (setupJSExecutorAndModuleConfig, bridgeQueue, ^{
146+ NSLog (@" Module config generation" );
144147 if (weakSelf.isValid ) {
145-
146148 RCTPerformanceLoggerStart (RCTPLNativeModulePrepareConfig);
147149 config = [weakSelf moduleConfig ];
148150 RCTPerformanceLoggerEnd (RCTPLNativeModulePrepareConfig);
@@ -151,11 +153,12 @@ - (void)start
151153 NSInteger total = [[_moduleDataByID valueForKeyPath: @" @sum.hasInstance" ] integerValue ];
152154 _asyncInitializedModules = total - _syncInitializedModules;
153155#endif
154-
155156 }
156157 });
157158
158159 dispatch_group_notify (setupJSExecutorAndModuleConfig, bridgeQueue, ^{
160+ NSLog (@" Module config injection" );
161+
159162 // We're not waiting for this to complete to leave dispatch group, since
160163 // injectJSONConfiguration and executeSourceCode will schedule operations
161164 // on the same queue anyway.
@@ -409,9 +412,11 @@ - (void)injectJSONConfiguration:(NSString *)configJSON
409412 onComplete : (void (^)(NSError *))onComplete
410413{
411414 if (!self.valid ) {
415+ NSLog (@" Bridge is not valid, not injecting JSON" );
412416 return ;
413417 }
414418
419+ NSLog (@" Bridge _is_ valid, injecting JSON to %@ " , _javaScriptExecutor);
415420 [_javaScriptExecutor injectJSONText: configJSON
416421 asGlobalObjectNamed: @" __fbBatchedBridgeConfig"
417422 callback: onComplete];
@@ -561,6 +566,8 @@ - (void)invalidate
561566 return ;
562567 }
563568
569+ NSLog (@" RCTBatchedBridge <%p >: invalidate called" , self);
570+
564571 RCTAssertMainThread ();
565572
566573 _loading = NO ;
0 commit comments