Move initialization of RCTBatchedBridge into its own method.

Summary: This makes room for local development without touching OSS code.

Reviewed By: tadeuzagallo

Differential Revision: D2986122

fb-gh-sync-id: 2f23088a078b0f0fb4b74946490fd5b67b01c0ac
shipit-source-id: 2f23088a078b0f0fb4b74946490fd5b67b01c0ac
This commit is contained in:
Marc Horowitz 2016-02-29 10:04:15 -08:00 committed by Facebook Github Bot 1
parent d7d47d8120
commit f331a58ed0

View File

@ -268,6 +268,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
// Sanitize the bundle URL
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
[self createBatchedBridge];
}
- (void)createBatchedBridge
{
self.batchedBridge = [[RCTBatchedBridge alloc] initWithParentBridge:self];
}
@ -288,7 +293,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
- (void)invalidate
{
RCTBatchedBridge *batchedBridge = (RCTBatchedBridge *)self.batchedBridge;
RCTBridge *batchedBridge = self.batchedBridge;
self.batchedBridge = nil;
if (batchedBridge) {