mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 22:41:28 +08:00
Added iOS support for loading multiple RAM bundles
Differential Revision: D5850970 fbshipit-source-id: 88ab6fe3822f1bc4195007f8ec83177a84c27569
This commit is contained in:
committed by
Facebook Github Bot
parent
79821917fa
commit
1aeb767a37
22
ReactCommon/cxxreact/JSIndexedRAMBundleRegistry.cpp
Normal file
22
ReactCommon/cxxreact/JSIndexedRAMBundleRegistry.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
||||
|
||||
#include "JSIndexedRAMBundleRegistry.h"
|
||||
|
||||
#include <cxxreact/JSIndexedRAMBundle.h>
|
||||
#include <folly/Memory.h>
|
||||
|
||||
#include "oss-compat-util.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::unique_ptr<JSModulesUnbundle> JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const {
|
||||
return folly::make_unique<JSIndexedRAMBundle>(bundlePathById(index).c_str());
|
||||
}
|
||||
|
||||
std::string JSIndexedRAMBundleRegistry::bundlePathById(uint32_t index) const {
|
||||
return m_baseDirectoryPath + "/js-bundles/" + toString(index) + ".jsbundle";
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
Reference in New Issue
Block a user