mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 19:48:56 +08:00
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:
committed by
Facebook Github Bot 7
parent
72e203bf95
commit
971cda8794
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user