Markers for JSC and Bridge Initialization

Differential Revision: D2507869
This commit is contained in:
Mike Armstrong
2015-10-05 07:57:36 -07:00
committed by facebook-github-bot-5
parent 943f62b81b
commit 4a5fed3c42
5 changed files with 60 additions and 5 deletions

View File

@@ -70,15 +70,29 @@ public class NativeModuleRegistry {
/* package */ void notifyCatalystInstanceDestroy() {
UiThreadUtil.assertOnUiThread();
for (NativeModule nativeModule : mModuleInstances.values()) {
nativeModule.onCatalystInstanceDestroy();
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"NativeModuleRegistry_notifyCatalystInstanceDestroy");
try {
for (NativeModule nativeModule : mModuleInstances.values()) {
nativeModule.onCatalystInstanceDestroy();
}
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}
}
/* package */ void notifyCatalystInstanceInitialized() {
UiThreadUtil.assertOnUiThread();
for (NativeModule nativeModule : mModuleInstances.values()) {
nativeModule.initialize();
Systrace.beginSection(
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
"NativeModuleRegistry_notifyCatalystInstanceInitialized");
try {
for (NativeModule nativeModule : mModuleInstances.values()) {
nativeModule.initialize();
}
} finally {
Systrace.endSection(Systrace.TRACE_TAG_REACT_JAVA_BRIDGE);
}
}