Remove allowLoadingNonRAMBundles

Differential Revision: D3555963

fbshipit-source-id: 24c23e8522c293aad030cd98e0c4ebcb76c54271
This commit is contained in:
Adam Ernst
2016-07-13 16:39:15 -07:00
committed by Facebook Github Bot 2
parent 37d03396c6
commit 235dd0051d
2 changed files with 2 additions and 15 deletions

View File

@@ -31,7 +31,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
NSError *error;
NSData *data = [self attemptSynchronousLoadOfBundleAtURL:scriptURL
sourceLength:&sourceLength
allowLoadingNonRAMBundles:NO // we'll do it async
error:&error];
if (data) {
onComplete(nil, data, sourceLength);
@@ -51,7 +50,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
+ (NSData *)attemptSynchronousLoadOfBundleAtURL:(NSURL *)scriptURL
sourceLength:(int64_t *)sourceLength
allowLoadingNonRAMBundles:(BOOL)allowLoadingNonRAMBundles
error:(NSError **)error
{
NSString *unsanitizedScriptURLString = scriptURL.absoluteString;
@@ -111,16 +109,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
magicNumber = NSSwapLittleIntToHost(magicNumber);
if (magicNumber != RCTRAMBundleMagicNumber) {
if (allowLoadingNonRAMBundles) {
NSData *source = [NSData dataWithContentsOfFile:scriptURL.path
options:NSDataReadingMappedIfSafe
error:error];
if (sourceLength && source != nil) {
*sourceLength = source.length;
}
return source;
}
if (error) {
*error = [NSError errorWithDomain:RCTJavaScriptLoaderErrorDomain
code:RCTJavaScriptLoaderErrorCannotBeLoadedSynchronously