add "jsBundlesDirectory" method to RCTBridgeDelegate

Differential Revision: D6030185

fbshipit-source-id: 58d6f9d0d412c7ad0f83af9ae4df01c4dc1178bc
This commit is contained in:
Alex Dvornikov
2017-10-12 12:33:21 -07:00
committed by Facebook Github Bot
parent 4192790f05
commit dd400f842b
4 changed files with 16 additions and 4 deletions
@@ -10,8 +10,8 @@
namespace facebook {
namespace react {
JSIndexedRAMBundleRegistry::JSIndexedRAMBundleRegistry(std::unique_ptr<JSModulesUnbundle> mainBundle, const std::string& entryFile):
RAMBundleRegistry(std::move(mainBundle)), m_baseDirectoryPath(jsBundlesDir(entryFile)) {}
JSIndexedRAMBundleRegistry::JSIndexedRAMBundleRegistry(std::unique_ptr<JSModulesUnbundle> mainBundle, const std::string& baseDirectoryPath):
RAMBundleRegistry(std::move(mainBundle)), m_baseDirectoryPath(baseDirectoryPath) {}
std::unique_ptr<JSModulesUnbundle> JSIndexedRAMBundleRegistry::bundleById(uint32_t index) const {
std::string bundlePathById = m_baseDirectoryPath + toString(index) + ".jsbundle";