mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make call frames point to function definition, not callsite (#51084)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51084 # Changelog: [Internal] Reviewed By: dannysu Differential Revision: D73850528 fbshipit-source-id: fc1c22c5bf7cf71f76cf49643af06eeb188b770c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
69f9a9a029
commit
271232d856
+7
-6
@@ -76,12 +76,13 @@ RuntimeSamplingProfile::SampleCallStackFrame convertJSFunctionHermesFrame(
|
||||
frame.getFunctionName(),
|
||||
frame.hasUrl() ? std::optional<std::string>{frame.getUrl()}
|
||||
: std::nullopt,
|
||||
frame.hasLineNumber() ? std::optional<uint32_t>{frame.getLineNumber() - 1}
|
||||
// Hermes VM keeps line numbers as 1-based. Convert
|
||||
// to 0-based.
|
||||
: std::nullopt,
|
||||
frame.hasColumnNumber()
|
||||
? std::optional<uint32_t>{frame.getColumnNumber() - 1}
|
||||
frame.hasFunctionLineNumber()
|
||||
? std::optional<uint32_t>{frame.getFunctionLineNumber() - 1}
|
||||
// Hermes VM keeps line numbers as 1-based. Convert
|
||||
// to 0-based.
|
||||
: std::nullopt,
|
||||
frame.hasFunctionColumnNumber()
|
||||
? std::optional<uint32_t>{frame.getFunctionColumnNumber() - 1}
|
||||
// Hermes VM keeps column numbers as 1-based. Convert to
|
||||
// 0-based.
|
||||
: std::nullopt,
|
||||
|
||||
Reference in New Issue
Block a user