Reenable JS profiler after reload

Summary: public

Call `nativeProfilerStart` after reloading the bridge.

Reviewed By: jspahrsummers

Differential Revision: D2656507

fb-gh-sync-id: 651ff078ae289cb9701663f5f8ef164db1b42d74
This commit is contained in:
Tadeu Zagallo 2015-11-16 03:32:37 -08:00 committed by facebook-github-bot-3
parent 6dd171b8c2
commit 905a8a4ce0

View File

@ -227,6 +227,11 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
}
static BOOL isProfiling = NO;
if (isProfiling) {
nativeProfilerStart(context, "profile");
}
[bridge.devMenu addItem:[RCTDevMenuItem toggleItemWithKey:RCTJSCProfilerEnabledDefaultsKey title:@"Start Profiling" selectedTitle:@"Stop Profiling" handler:^(BOOL shouldStart) {
if (shouldStart == isProfiling) {