Support sync loading of the initial bundle/source

Reviewed By: javache

Differential Revision: D3897521

fbshipit-source-id: a4f234c7003a5f4be952d315eb62f382836e24dc
This commit is contained in:
Marc Horowitz
2016-09-26 16:01:42 -07:00
committed by Facebook Github Bot 7
parent 51df83d7d5
commit 6071e8ca2c
4 changed files with 54 additions and 4 deletions

View File

@@ -152,6 +152,17 @@ void NativeToJsBridge::loadApplication(
});
}
void NativeToJsBridge::loadApplicationSync(
std::unique_ptr<JSModulesUnbundle> unbundle,
std::unique_ptr<const JSBigString> startupScript,
std::string startupScriptSourceURL) {
if (unbundle) {
m_mainExecutor->setJSModulesUnbundle(std::move(unbundle));
}
m_mainExecutor->loadApplicationScript(std::move(startupScript),
std::move(startupScriptSourceURL));
}
void NativeToJsBridge::callFunction(
ExecutorToken executorToken,
std::string&& module,