From 9e34cbda9de8f7350cfb02c884fbef2da18e0e3a Mon Sep 17 00:00:00 2001 From: Alex Dvornikov Date: Tue, 16 Jan 2018 15:15:32 -0800 Subject: [PATCH] Add Bundle Splitting support for source code bundles Reviewed By: amnn Differential Revision: D6695431 fbshipit-source-id: 76f4c09b7caadabad5b327af29c02afe61f31abd --- ReactCommon/cxxreact/JSCExecutor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index 91c7716cb..09452f153 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -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); } }