Move thread jump for js loading into NativeToJSBridge, out of platform code

Reviewed By: javache

Differential Revision: D3906009

fbshipit-source-id: b9782a6c209e3c1626899dac7fd50233cdef87f3
This commit is contained in:
Marc Horowitz
2016-09-26 16:01:38 -07:00
committed by Facebook Github Bot 7
parent 72e203bf95
commit 971cda8794
6 changed files with 28 additions and 62 deletions

View File

@@ -271,6 +271,8 @@ void JSCExecutor::loadApplicationScript(
return loadApplicationScript(std::move(jsScriptBigString), sourceURL);
}
ReactMarker::logMarker("RUN_JS_BUNDLE_START");
if (flags & UNPACKED_BC_CACHE) {
configureJSCBCCache(m_context, bundlePath);
}
@@ -290,6 +292,7 @@ void JSCExecutor::loadApplicationScript(
flush();
ReactMarker::logMarker("CREATE_REACT_CONTEXT_END");
ReactMarker::logMarker("RUN_JS_BUNDLE_END");
}
#endif
@@ -303,6 +306,8 @@ void JSCExecutor::loadApplicationScript(std::unique_ptr<const JSBigString> scrip
"JSCExecutor::loadApplicationScript-createExpectingAscii");
#endif
ReactMarker::logMarker("RUN_JS_BUNDLE_START");
ReactMarker::logMarker("loadApplicationScript_startStringConvert");
String jsScript = jsStringFromBigString(*script);
ReactMarker::logMarker("loadApplicationScript_endStringConvert");
@@ -313,11 +318,11 @@ void JSCExecutor::loadApplicationScript(std::unique_ptr<const JSBigString> scrip
String jsSourceURL(sourceURL.c_str());
evaluateScript(m_context, jsScript, jsSourceURL);
bindBridge();
flush();
ReactMarker::logMarker("CREATE_REACT_CONTEXT_END");
ReactMarker::logMarker("RUN_JS_BUNDLE_END");
}
void JSCExecutor::setJSModulesUnbundle(std::unique_ptr<JSModulesUnbundle> unbundle) {