Add Bundle Splitting support for source code bundles

Reviewed By: amnn

Differential Revision: D6695431

fbshipit-source-id: 76f4c09b7caadabad5b327af29c02afe61f31abd
This commit is contained in:
Alex Dvornikov 2018-01-16 15:15:32 -08:00 committed by Facebook Github Bot
parent 6882132421
commit 9e34cbda9d
1 changed files with 4 additions and 0 deletions

View File

@ -455,6 +455,10 @@ namespace facebook {
void JSCExecutor::registerBundle(uint32_t bundleId, const std::string& bundlePath) {
if (m_bundleRegistry) {
m_bundleRegistry->registerBundle(bundleId, bundlePath);
} else {
auto sourceUrl = String(m_context, bundlePath.c_str());
auto source = adoptString(JSBigFileString::fromPath(bundlePath));
evaluateScript(m_context, source, sourceUrl);
}
}