Unify supplimentary bundle path creation logic between Android and iOS

Differential Revision: D5941546

fbshipit-source-id: c9b8fab887f480faa373c26a1d5ba310e8acde78
This commit is contained in:
Alex Dvornikov
2017-10-04 15:16:27 -07:00
committed by Facebook Github Bot
parent adde2ed5e9
commit 9e01d72103
6 changed files with 25 additions and 25 deletions
@@ -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