mirror of
https://github.com/status-im/react-native.git
synced 2025-01-30 03:05:44 +00:00
Fix logging reported by RUN_JS_BUNDLE
Reviewed By: mhorowitz Differential Revision: D3144775 fb-gh-sync-id: 9d6aa66a74437c90faa09dc53d8772be79a4c65e fbshipit-source-id: 9d6aa66a74437c90faa09dc53d8772be79a4c65e
This commit is contained in:
parent
874bcd3ee3
commit
2d0051f213
@ -80,7 +80,6 @@ import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_CATALYST_INS
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_REACT_CONTEXT_START;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_PACKAGES_END;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_PACKAGES_START;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_END;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START;
|
||||
|
||||
/**
|
||||
@ -791,6 +790,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
||||
JSBundleLoader jsBundleLoader) {
|
||||
FLog.i(ReactConstants.TAG, "Creating react context.");
|
||||
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START);
|
||||
// CREATE_REACT_CONTEXT_END is in JSCExecutor.cpp
|
||||
mSourceUrl = jsBundleLoader.getSourceUrl();
|
||||
NativeModuleRegistry.Builder nativeRegistryBuilder = new NativeModuleRegistry.Builder();
|
||||
JavaScriptModulesConfig.Builder jsModulesBuilder = new JavaScriptModulesConfig.Builder();
|
||||
@ -857,7 +857,6 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
||||
.setNativeModuleCallExceptionHandler(exceptionHandler);
|
||||
|
||||
ReactMarker.logMarker(CREATE_CATALYST_INSTANCE_START);
|
||||
// CREATE_CATALYST_INSTANCE_END is in JSCExecutor.cpp
|
||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstance");
|
||||
CatalystInstance catalystInstance;
|
||||
try {
|
||||
@ -874,12 +873,13 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
||||
reactContext.initializeWithInstance(catalystInstance);
|
||||
|
||||
ReactMarker.logMarker(RUN_JS_BUNDLE_START);
|
||||
// RUN_JS_BUNDLE_END is in JSCExecutor.cpp
|
||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle");
|
||||
try {
|
||||
catalystInstance.runJSBundle();
|
||||
} finally {
|
||||
// This will actually finish when `JSCExecutor#loadApplicationScript()` finishes
|
||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
ReactMarker.logMarker(RUN_JS_BUNDLE_END);
|
||||
}
|
||||
|
||||
return reactContext;
|
||||
|
@ -243,6 +243,7 @@ void JSCExecutor::loadApplicationScript(
|
||||
evaluateScript(m_context, jsScript, jsSourceURL, m_deviceCacheDir.c_str());
|
||||
}
|
||||
flush();
|
||||
ReactMarker::logMarker("RUN_JS_BUNDLE_END");
|
||||
ReactMarker::logMarker("CREATE_REACT_CONTEXT_END");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user