Remove RAMBundleRegistry subclasses

Differential Revision: D6262247

fbshipit-source-id: 708f919e34f1706d9aca19a34ad8ea506e9f8d8b
This commit is contained in:
Alex Dvornikov
2017-11-08 04:12:20 -08:00
committed by Facebook Github Bot
parent b0193b098c
commit 6ecae73fe5
15 changed files with 54 additions and 131 deletions
@@ -2,11 +2,20 @@
#include "JSIndexedRAMBundle.h"
#include <folly/Memory.h>
#include "oss-compat-util.h"
namespace facebook {
namespace react {
std::function<std::unique_ptr<JSModulesUnbundle>(uint32_t)> JSIndexedRAMBundle::buildFactory(const std::string& baseDirectoryPath) {
return [baseDirectoryPath](uint32_t index){
std::string bundlePathById = baseDirectoryPath + toString(index) + ".jsbundle";
return folly::make_unique<JSIndexedRAMBundle>(bundlePathById.c_str());
};
}
JSIndexedRAMBundle::JSIndexedRAMBundle(const char *sourcePath) :
m_bundle (sourcePath, std::ios_base::in) {
if (!m_bundle) {