diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 94b3bc58682..dce385e4eab 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -419,6 +419,8 @@ static NSThread *newJavaScriptThread(void) } }; +#ifdef RCT_DEV + // Add toggles for JSC's sampling profiler, if the profiler is enabled if (self->_jscWrapper->JSSamplingProfilerEnabled()) { // Mark this thread as the main JS thread before starting profiling. @@ -449,6 +451,7 @@ static NSThread *newJavaScriptThread(void) }; } #endif +#endif #if RCT_DEV RCTInstallJSCProfiler(self->_bridge, context.JSGlobalContextRef);