Remove RAMBundleRegistry subclasses

Differential Revision: D6262247

fbshipit-source-id: 708f919e34f1706d9aca19a34ad8ea506e9f8d8b
This commit is contained in:
Alex Dvornikov
2017-11-08 03:50:36 -08:00
committed by Facebook Github Bot
parent b0193b098c
commit 6ecae73fe5
15 changed files with 54 additions and 131 deletions

View File

@@ -35,8 +35,8 @@
#import <cxxreact/JSBundleType.h>
#import <cxxreact/JSCExecutor.h>
#import <cxxreact/JSIndexedRAMBundle.h>
#include <cxxreact/JSIndexedRAMBundleRegistry.h>
#import <cxxreact/Platform.h>
#import <cxxreact/RAMBundleRegistry.h>
#import <jschelpers/Value.h>
#import "NSDataBigString.h"
@@ -1152,8 +1152,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
? [[self.delegate jsSegmentsDirectory].path stringByAppendingString:@"/"]
: nil;
auto registry = jsSegmentsDirectory != nil
? std::make_unique<JSIndexedRAMBundleRegistry>(std::move(ramBundle), jsSegmentsDirectory.UTF8String)
: std::make_unique<RAMBundleRegistry>(std::move(ramBundle));
? RAMBundleRegistry::multipleBundlesRegistry(std::move(ramBundle), JSIndexedRAMBundle::buildFactory(jsSegmentsDirectory.UTF8String))
: RAMBundleRegistry::singleBundleRegistry(std::move(ramBundle));
self->_reactInstance->loadRAMBundle(std::move(registry), std::move(scriptStr),
sourceUrlStr.UTF8String, !async);
}

View File

@@ -1023,7 +1023,6 @@
597633371F4E021D005BE8A4 /* RCTShadowView+Internal.m in Sources */ = {isa = PBXBuildFile; fileRef = 597633341F4E021D005BE8A4 /* RCTShadowView+Internal.m */; };
597633381F4E021D005BE8A4 /* RCTShadowView+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 597633351F4E021D005BE8A4 /* RCTShadowView+Internal.h */; };
597633391F4E021D005BE8A4 /* RCTShadowView+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 597633351F4E021D005BE8A4 /* RCTShadowView+Internal.h */; };
598FD1911F816998006C54CB /* JSIndexedRAMBundleRegistry.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */; };
598FD1921F816A2A006C54CB /* RAMBundleRegistry.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = C6D380181F71D75B00621378 /* RAMBundleRegistry.h */; };
598FD1931F817284006C54CB /* PrivateDataBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9936F3351F5F2F480010BF04 /* PrivateDataBase.cpp */; };
598FD1941F8172A9006C54CB /* PrivateDataBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9936F3361F5F2F480010BF04 /* PrivateDataBase.h */; };
@@ -1158,7 +1157,6 @@
C654505E1F3BD9280090799B /* RCTManagedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = C654505D1F3BD9280090799B /* RCTManagedPointer.h */; };
C654505F1F3BD9280090799B /* RCTManagedPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = C654505D1F3BD9280090799B /* RCTManagedPointer.h */; };
C669D8981F72E3DE006748EB /* RAMBundleRegistry.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = C6D380181F71D75B00621378 /* RAMBundleRegistry.h */; };
C669D8B91F72E4B7006748EB /* JSIndexedRAMBundleRegistry.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */; };
C6827DF61EF17CCC00D66BEF /* RCTJSEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = C6827DF51EF17CCC00D66BEF /* RCTJSEnvironment.h */; };
C6827DF71EF17CCC00D66BEF /* RCTJSEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = C6827DF51EF17CCC00D66BEF /* RCTJSEnvironment.h */; };
C6827DFB1EF1800E00D66BEF /* RCTJSEnvironment.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = C6827DF51EF17CCC00D66BEF /* RCTJSEnvironment.h */; };
@@ -1167,10 +1165,6 @@
C6D3801B1F71D76200621378 /* RAMBundleRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D380181F71D75B00621378 /* RAMBundleRegistry.h */; };
C6D3801C1F71D76700621378 /* RAMBundleRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D380191F71D75B00621378 /* RAMBundleRegistry.cpp */; };
C6D3801D1F71D76800621378 /* RAMBundleRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D380191F71D75B00621378 /* RAMBundleRegistry.cpp */; };
C6D380201F71D91D00621378 /* JSIndexedRAMBundleRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */; };
C6D380211F71D91E00621378 /* JSIndexedRAMBundleRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */; };
C6D380221F71D92300621378 /* JSIndexedRAMBundleRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D3801F1F71D91600621378 /* JSIndexedRAMBundleRegistry.cpp */; };
C6D380231F71D92400621378 /* JSIndexedRAMBundleRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C6D3801F1F71D91600621378 /* JSIndexedRAMBundleRegistry.cpp */; };
CF2731C01E7B8DE40044CA4F /* RCTDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = CF2731BE1E7B8DE40044CA4F /* RCTDeviceInfo.h */; };
CF2731C11E7B8DE40044CA4F /* RCTDeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = CF2731BF1E7B8DE40044CA4F /* RCTDeviceInfo.m */; };
CF2731C21E7B8DEF0044CA4F /* RCTDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = CF2731BE1E7B8DE40044CA4F /* RCTDeviceInfo.h */; };
@@ -1455,7 +1449,6 @@
dstSubfolderSpec = 16;
files = (
598FD1921F816A2A006C54CB /* RAMBundleRegistry.h in Copy Headers */,
598FD1911F816998006C54CB /* JSIndexedRAMBundleRegistry.h in Copy Headers */,
3DA9823B1E5B1053004F2374 /* CxxModule.h in Copy Headers */,
3DA9823C1E5B1053004F2374 /* CxxNativeModule.h in Copy Headers */,
3DA9823D1E5B1053004F2374 /* JSExecutor.h in Copy Headers */,
@@ -1674,7 +1667,6 @@
dstPath = include/cxxreact;
dstSubfolderSpec = 16;
files = (
C669D8B91F72E4B7006748EB /* JSIndexedRAMBundleRegistry.h in Copy Headers */,
C669D8981F72E3DE006748EB /* RAMBundleRegistry.h in Copy Headers */,
3DA981A01E5B0E34004F2374 /* CxxModule.h in Copy Headers */,
3DA981A11E5B0E34004F2374 /* CxxNativeModule.h in Copy Headers */,
@@ -2194,8 +2186,6 @@
C6827DF51EF17CCC00D66BEF /* RCTJSEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJSEnvironment.h; sourceTree = "<group>"; };
C6D380181F71D75B00621378 /* RAMBundleRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RAMBundleRegistry.h; sourceTree = "<group>"; };
C6D380191F71D75B00621378 /* RAMBundleRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RAMBundleRegistry.cpp; sourceTree = "<group>"; };
C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSIndexedRAMBundleRegistry.h; sourceTree = "<group>"; };
C6D3801F1F71D91600621378 /* JSIndexedRAMBundleRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIndexedRAMBundleRegistry.cpp; sourceTree = "<group>"; };
CF2731BE1E7B8DE40044CA4F /* RCTDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTDeviceInfo.h; sourceTree = "<group>"; };
CF2731BF1E7B8DE40044CA4F /* RCTDeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTDeviceInfo.m; sourceTree = "<group>"; };
E3BBC8EB1ADE6F47001BBD81 /* RCTTextDecorationLineType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTTextDecorationLineType.h; sourceTree = "<group>"; };
@@ -2905,8 +2895,6 @@
3D92B0AB1E03699D0018521A /* JSExecutor.h */,
3D92B0C61E03699D0018521A /* JSIndexedRAMBundle.cpp */,
3D92B0C71E03699D0018521A /* JSIndexedRAMBundle.h */,
C6D3801F1F71D91600621378 /* JSIndexedRAMBundleRegistry.cpp */,
C6D3801E1F71D91600621378 /* JSIndexedRAMBundleRegistry.h */,
3D92B0C81E03699D0018521A /* JSModulesUnbundle.h */,
3D92B0C91E03699D0018521A /* MessageQueueThread.h */,
3D92B0CA1E03699D0018521A /* MethodCall.cpp */,
@@ -3154,7 +3142,6 @@
27595AC61E575C7800CCE2B1 /* JsArgumentHelpers.h in Headers */,
27595AD71E575C7800CCE2B1 /* SampleCxxModule.h in Headers */,
27595AD21E575C7800CCE2B1 /* MethodCall.h in Headers */,
C6D380211F71D91E00621378 /* JSIndexedRAMBundleRegistry.h in Headers */,
3D3030221DF8294C00D6DDAE /* JSBundleType.h in Headers */,
27595ACA1E575C7800CCE2B1 /* JSCMemory.h in Headers */,
3D74547D1E54758900E74ADD /* JSBigString.h in Headers */,
@@ -3244,7 +3231,6 @@
27595AAB1E575C7800CCE2B1 /* JsArgumentHelpers.h in Headers */,
27595ABC1E575C7800CCE2B1 /* SampleCxxModule.h in Headers */,
27595AB71E575C7800CCE2B1 /* MethodCall.h in Headers */,
C6D380201F71D91D00621378 /* JSIndexedRAMBundleRegistry.h in Headers */,
3D3CD9471DE5FC7800167DC4 /* oss-compat-util.h in Headers */,
27595AAF1E575C7800CCE2B1 /* JSCMemory.h in Headers */,
3D74547C1E54758900E74ADD /* JSBigString.h in Headers */,
@@ -4133,7 +4119,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C6D380221F71D92300621378 /* JSIndexedRAMBundleRegistry.cpp in Sources */,
3DC159E51E83E1E9007B1282 /* JSBigString.cpp in Sources */,
13F8877B1E29726200C3C7A1 /* JSIndexedRAMBundle.cpp in Sources */,
13F8877D1E29726200C3C7A1 /* ModuleRegistry.cpp in Sources */,
@@ -4159,7 +4144,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C6D380231F71D92400621378 /* JSIndexedRAMBundleRegistry.cpp in Sources */,
3DC159E61E83E1FA007B1282 /* JSBigString.cpp in Sources */,
13F8878E1E29726300C3C7A1 /* JSIndexedRAMBundle.cpp in Sources */,
13F887901E29726300C3C7A1 /* ModuleRegistry.cpp in Sources */,