diff --git a/React/Executors/RCTContextExecutor.m b/React/Executors/RCTContextExecutor.m index 7ceaf37c4..163718799 100644 --- a/React/Executors/RCTContextExecutor.m +++ b/React/Executors/RCTContextExecutor.m @@ -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) {