Rename bundleSource to embeddedBundle

Reviewed By: fromcelticpark

Differential Revision: D6274101

fbshipit-source-id: f62da158d165cb3ce4a510ebc4eed24a8a719381
This commit is contained in:
Yujie Liu 2017-11-09 09:01:21 -08:00 committed by Facebook Github Bot
parent e9393f694d
commit ae5ef653cb
5 changed files with 11 additions and 11 deletions

View File

@ -172,9 +172,9 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
@property (nonatomic, strong, readonly) NSURL *bundleURL; @property (nonatomic, strong, readonly) NSURL *bundleURL;
/** /**
* URL of the original script (not necessarily loaded) of the bridge. * URL of the embedded bundle of the bridge.
*/ */
@property (nonatomic, strong, readonly) NSURL *bundledSourceURL; @property (nonatomic, strong, readonly) NSURL *embeddedBundleURL;
/** /**
* The class of the executor currently being used. Changes to this value will * The class of the executor currently being used. Changes to this value will

View File

@ -329,9 +329,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
// Sanitize the bundle URL // Sanitize the bundle URL
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString]; _bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];
if ([self.delegate respondsToSelector:@selector(bundledSourceURLForBridge:)]) { if ([self.delegate respondsToSelector:@selector(embeddedBundleURLForBridge:)]) {
_bundledSourceURL = [self.delegate bundledSourceURLForBridge:self]; _embeddedBundleURL = [self.delegate embeddedBundleURLForBridge:self];
_bundledSourceURL = [RCTConvert NSURL:_bundledSourceURL.absoluteString]; _embeddedBundleURL = [RCTConvert NSURL:_embeddedBundleURL.absoluteString];
} }
self.batchedBridge = [[bridgeClass alloc] initWithParentBridge:self]; self.batchedBridge = [[bridgeClass alloc] initWithParentBridge:self];

View File

@ -41,10 +41,10 @@
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge; - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge;
/** /**
* The location of bundle path, this should be a `file://` url * The location of embedded bundle path, this should be a `file://` url
* pointing to a path inside the bundle resources, e.g. `file://..//main.jsbundle`. * pointing to a path inside the bundle resources, e.g. `file://..//main.jsbundle`.
*/ */
- (NSURL *)bundledSourceURLForBridge:(RCTBridge *)bridge; - (NSURL *)embeddedBundleURLForBridge:(RCTBridge *)bridge;
/** /**
* Configure whether the JSCExecutor created should use the system JSC API or * Configure whether the JSCExecutor created should use the system JSC API or

View File

@ -176,8 +176,8 @@ struct RCTInstanceCallback : public InstanceCallback {
} }
@synthesize bridgeDescription = _bridgeDescription; @synthesize bridgeDescription = _bridgeDescription;
@synthesize embeddedBundleURL = _embeddedBundleURL;
@synthesize loading = _loading; @synthesize loading = _loading;
@synthesize bundledSourceURL = _bundledSourceURL;
@synthesize performanceLogger = _performanceLogger; @synthesize performanceLogger = _performanceLogger;
@synthesize valid = _valid; @synthesize valid = _valid;
@ -208,8 +208,8 @@ struct RCTInstanceCallback : public InstanceCallback {
launchOptions:bridge.launchOptions])) { launchOptions:bridge.launchOptions])) {
_parentBridge = bridge; _parentBridge = bridge;
_performanceLogger = [bridge performanceLogger]; _performanceLogger = [bridge performanceLogger];
if ([bridge.delegate respondsToSelector:@selector(bundledSourceURLForBridge:)]) { if ([bridge.delegate respondsToSelector:@selector(embeddedBundleURLForBridge:)]) {
_bundledSourceURL = [bridge.delegate bundledSourceURLForBridge:bridge]; _embeddedBundleURL = [bridge.delegate embeddedBundleURLForBridge:bridge];
} }
registerPerformanceLoggerHooks(_performanceLogger); registerPerformanceLoggerHooks(_performanceLogger);

View File

@ -26,7 +26,7 @@ RCT_EXPORT_MODULE()
{ {
return @{ return @{
@"scriptURL": self.bridge.bundleURL.absoluteString ?: @"", @"scriptURL": self.bridge.bundleURL.absoluteString ?: @"",
@"bundledScriptURL": self.bridge.bundledSourceURL.absoluteString ?: @"" @"embeddedBundleURL": self.bridge.embeddedBundleURL.absoluteString ?: @""
}; };
} }