From 77df5a9c29a77f991a4c2e5ebbcbf2fbfa4df3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Mon, 18 Sep 2023 08:54:21 -0700 Subject: [PATCH] Fix broken profiling on builds with debugger enabled (#39517) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39517 Fixes broken profiling on builds with debugger enabled. Changelog: [internal] Reviewed By: luluwu2032 Differential Revision: D49370067 fbshipit-source-id: eb76dcda69856bc0828c92513e88e86168d1805a --- .../ReactCommon/react/runtime/hermes/HermesInstance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp index 5c3195aec30..cbb786a2fd1 100644 --- a/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp +++ b/packages/react-native/ReactCommon/react/runtime/hermes/HermesInstance.cpp @@ -129,6 +129,8 @@ std::unique_ptr HermesInstance::createJSRuntime( std::unique_ptr hermesRuntime = hermes::makeHermesRuntime(runtimeConfigBuilder.build()); + jsi::addNativeTracingHooks(*hermesRuntime); + #ifdef HERMES_ENABLE_DEBUGGER std::unique_ptr decoratedRuntime = std::make_unique( @@ -136,8 +138,6 @@ std::unique_ptr HermesInstance::createJSRuntime( return decoratedRuntime; #endif - jsi::addNativeTracingHooks(*hermesRuntime); - return hermesRuntime; }