diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index 486961001..3dfe2db47 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -651,7 +651,7 @@ namespace facebook { void JSCExecutor::loadModule(uint32_t bundleId, uint32_t moduleId) { auto module = m_bundleRegistry->getModule(bundleId, moduleId); auto sourceUrl = String::createExpectingAscii(m_context, module.name); - auto source = String::createExpectingAscii(m_context, module.code); + auto source = adoptString(std::unique_ptr(new JSBigStdString(module.code))); evaluateScript(m_context, source, sourceUrl); }