Skip to content

Commit

Permalink
Rename bundleSource to embeddedBundle
Browse files Browse the repository at this point in the history
Reviewed By: fromcelticpark

Differential Revision: D6274101

fbshipit-source-id: f62da158d165cb3ce4a510ebc4eed24a8a719381
  • Loading branch information
Yujie Liu authored and facebook-github-bot committed Nov 9, 2017
1 parent e9393f6 commit ae5ef65
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions React/Base/RCTBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
@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
Expand Down
6 changes: 3 additions & 3 deletions React/Base/RCTBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ - (void)setUp
// Sanitize the bundle URL
_bundleURL = [RCTConvert NSURL:_bundleURL.absoluteString];

if ([self.delegate respondsToSelector:@selector(bundledSourceURLForBridge:)]) {
_bundledSourceURL = [self.delegate bundledSourceURLForBridge:self];
_bundledSourceURL = [RCTConvert NSURL:_bundledSourceURL.absoluteString];
if ([self.delegate respondsToSelector:@selector(embeddedBundleURLForBridge:)]) {
_embeddedBundleURL = [self.delegate embeddedBundleURLForBridge:self];
_embeddedBundleURL = [RCTConvert NSURL:_embeddedBundleURL.absoluteString];
}

self.batchedBridge = [[bridgeClass alloc] initWithParentBridge:self];
Expand Down
4 changes: 2 additions & 2 deletions React/Base/RCTBridgeDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
- (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`.
*/
- (NSURL *)bundledSourceURLForBridge:(RCTBridge *)bridge;
- (NSURL *)embeddedBundleURLForBridge:(RCTBridge *)bridge;

/**
* Configure whether the JSCExecutor created should use the system JSC API or
Expand Down
6 changes: 3 additions & 3 deletions React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ @implementation RCTCxxBridge
}

@synthesize bridgeDescription = _bridgeDescription;
@synthesize embeddedBundleURL = _embeddedBundleURL;
@synthesize loading = _loading;
@synthesize bundledSourceURL = _bundledSourceURL;
@synthesize performanceLogger = _performanceLogger;
@synthesize valid = _valid;

Expand Down Expand Up @@ -208,8 +208,8 @@ - (instancetype)initWithParentBridge:(RCTBridge *)bridge
launchOptions:bridge.launchOptions])) {
_parentBridge = bridge;
_performanceLogger = [bridge performanceLogger];
if ([bridge.delegate respondsToSelector:@selector(bundledSourceURLForBridge:)]) {
_bundledSourceURL = [bridge.delegate bundledSourceURLForBridge:bridge];
if ([bridge.delegate respondsToSelector:@selector(embeddedBundleURLForBridge:)]) {
_embeddedBundleURL = [bridge.delegate embeddedBundleURLForBridge:bridge];
}

registerPerformanceLoggerHooks(_performanceLogger);
Expand Down
2 changes: 1 addition & 1 deletion React/Modules/RCTSourceCode.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ + (BOOL)requiresMainQueueSetup
{
return @{
@"scriptURL": self.bridge.bundleURL.absoluteString ?: @"",
@"bundledScriptURL": self.bridge.bundledSourceURL.absoluteString ?: @""
@"embeddedBundleURL": self.bridge.embeddedBundleURL.absoluteString ?: @""
};
}

Expand Down

0 comments on commit ae5ef65

Please sign in to comment.