Skip to content

Commit 84947fb

Browse files
sbuggaymeta-codesync[bot]
authored andcommitted
Fix performance analyze path from DevMenu (facebook#54018)
Summary: Pull Request resolved: facebook#54018 The DevMenu path for perf analyzing no-ops. This is due to incorrectly not inverting the bool result of `pauseAndAnalyzeBackgroundTrace()`. See https://www.internalfb.com/code/fbsource/%5Bfcebbc02e701%5D/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayManager.kt?lines=73-75. {F1982418482} Changelog: [Internal] Reviewed By: shwanton Differential Revision: D83691623 fbshipit-source-id: a16e39b00c07b6846092cc29bc656a08a61d20bb
1 parent 89f0a37 commit 84947fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ public abstract class DevSupportManagerBase(
381381
DevOptionHandler {
382382
UiThreadUtil.runOnUiThread {
383383
if (reactInstanceDevHelper is PerfMonitorDevHelper) {
384-
reactInstanceDevHelper.inspectorTarget?.let {
385-
if (it.pauseAndAnalyzeBackgroundTrace()) {
384+
reactInstanceDevHelper.inspectorTarget?.let { target ->
385+
if (!target.pauseAndAnalyzeBackgroundTrace()) {
386386
openDebugger(DebuggerFrontendPanelName.PERFORMANCE.toString())
387387
}
388388
}

0 commit comments

Comments
 (0)