mirror of
https://github.com/status-im/react-native.git
synced 2025-02-11 17:07:09 +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.CREATE_REACT_CONTEXT_START;
|
||||||
import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_PACKAGES_END;
|
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.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;
|
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) {
|
JSBundleLoader jsBundleLoader) {
|
||||||
FLog.i(ReactConstants.TAG, "Creating react context.");
|
FLog.i(ReactConstants.TAG, "Creating react context.");
|
||||||
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START);
|
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START);
|
||||||
|
// CREATE_REACT_CONTEXT_END is in JSCExecutor.cpp
|
||||||
mSourceUrl = jsBundleLoader.getSourceUrl();
|
mSourceUrl = jsBundleLoader.getSourceUrl();
|
||||||
NativeModuleRegistry.Builder nativeRegistryBuilder = new NativeModuleRegistry.Builder();
|
NativeModuleRegistry.Builder nativeRegistryBuilder = new NativeModuleRegistry.Builder();
|
||||||
JavaScriptModulesConfig.Builder jsModulesBuilder = new JavaScriptModulesConfig.Builder();
|
JavaScriptModulesConfig.Builder jsModulesBuilder = new JavaScriptModulesConfig.Builder();
|
||||||
@ -857,7 +857,6 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
|||||||
.setNativeModuleCallExceptionHandler(exceptionHandler);
|
.setNativeModuleCallExceptionHandler(exceptionHandler);
|
||||||
|
|
||||||
ReactMarker.logMarker(CREATE_CATALYST_INSTANCE_START);
|
ReactMarker.logMarker(CREATE_CATALYST_INSTANCE_START);
|
||||||
// CREATE_CATALYST_INSTANCE_END is in JSCExecutor.cpp
|
|
||||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstance");
|
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstance");
|
||||||
CatalystInstance catalystInstance;
|
CatalystInstance catalystInstance;
|
||||||
try {
|
try {
|
||||||
@ -874,12 +873,13 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
|
|||||||
reactContext.initializeWithInstance(catalystInstance);
|
reactContext.initializeWithInstance(catalystInstance);
|
||||||
|
|
||||||
ReactMarker.logMarker(RUN_JS_BUNDLE_START);
|
ReactMarker.logMarker(RUN_JS_BUNDLE_START);
|
||||||
|
// RUN_JS_BUNDLE_END is in JSCExecutor.cpp
|
||||||
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle");
|
Systrace.beginSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle");
|
||||||
try {
|
try {
|
||||||
catalystInstance.runJSBundle();
|
catalystInstance.runJSBundle();
|
||||||
} finally {
|
} finally {
|
||||||
|
// This will actually finish when `JSCExecutor#loadApplicationScript()` finishes
|
||||||
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||||
ReactMarker.logMarker(RUN_JS_BUNDLE_END);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return reactContext;
|
return reactContext;
|
||||||
|
@ -243,6 +243,7 @@ void JSCExecutor::loadApplicationScript(
|
|||||||
evaluateScript(m_context, jsScript, jsSourceURL, m_deviceCacheDir.c_str());
|
evaluateScript(m_context, jsScript, jsSourceURL, m_deviceCacheDir.c_str());
|
||||||
}
|
}
|
||||||
flush();
|
flush();
|
||||||
|
ReactMarker::logMarker("RUN_JS_BUNDLE_END");
|
||||||
ReactMarker::logMarker("CREATE_REACT_CONTEXT_END");
|
ReactMarker::logMarker("CREATE_REACT_CONTEXT_END");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user