diff --git a/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp b/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp index dea271f42a3..64548dadc8c 100644 --- a/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp +++ b/packages/react-native/ReactCommon/hermes/inspector-modern/chrome/HermesRuntimeSamplingProfileSerializer.cpp @@ -76,12 +76,13 @@ RuntimeSamplingProfile::SampleCallStackFrame convertJSFunctionHermesFrame( frame.getFunctionName(), frame.hasUrl() ? std::optional{frame.getUrl()} : std::nullopt, - frame.hasLineNumber() ? std::optional{frame.getLineNumber() - 1} - // Hermes VM keeps line numbers as 1-based. Convert - // to 0-based. - : std::nullopt, - frame.hasColumnNumber() - ? std::optional{frame.getColumnNumber() - 1} + frame.hasFunctionLineNumber() + ? std::optional{frame.getFunctionLineNumber() - 1} + // Hermes VM keeps line numbers as 1-based. Convert + // to 0-based. + : std::nullopt, + frame.hasFunctionColumnNumber() + ? std::optional{frame.getFunctionColumnNumber() - 1} // Hermes VM keeps column numbers as 1-based. Convert to // 0-based. : std::nullopt,