mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Unify supplimentary bundle path creation logic between Android and iOS
Differential Revision: D5941546 fbshipit-source-id: c9b8fab887f480faa373c26a1d5ba310e8acde78
This commit is contained in:
committed by
Facebook Github Bot
parent
adde2ed5e9
commit
9e01d72103
@@ -10,12 +10,12 @@
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
std::unique_ptr<JSModulesUnbundle> JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const {
|
||||
return folly::make_unique<JSIndexedRAMBundle>(bundlePathById(index).c_str());
|
||||
}
|
||||
JSIndexedRAMBundleRegistry::JSIndexedRAMBundleRegistry(std::unique_ptr<JSModulesUnbundle> mainBundle, const std::string& entryFile):
|
||||
RAMBundleRegistry(std::move(mainBundle)), m_baseDirectoryPath(jsBundlesDir(entryFile)) {}
|
||||
|
||||
std::string JSIndexedRAMBundleRegistry::bundlePathById(uint32_t index) const {
|
||||
return m_baseDirectoryPath + "/js-bundles/" + toString(index) + ".jsbundle";
|
||||
std::unique_ptr<JSModulesUnbundle> JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const {
|
||||
std::string bundlePathById = m_baseDirectoryPath + toString(index) + ".jsbundle";
|
||||
return folly::make_unique<JSIndexedRAMBundle>(bundlePathById.c_str());
|
||||
}
|
||||
|
||||
} // namespace react
|
||||
|
||||
Reference in New Issue
Block a user