mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove RAMBundleRegistry subclasses
Differential Revision: D6262247 fbshipit-source-id: 708f919e34f1706d9aca19a34ad8ea506e9f8d8b
This commit is contained in:
committed by
Facebook Github Bot
parent
b0193b098c
commit
6ecae73fe5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user