Skip to content

Commit 121f895

Browse files
Garima ChadhaDevtools-frontend LUCI CQ
authored andcommitted
Fix DevTools Memory Tab ‘Take Heap Snapshot’ Button Icon State Update
The fix ensures that "Take heap snapshot" button in the DevTools Memory tab no longer toggles in scenarios where recording cannot be stopped, ensuring the icon state remains accurate. Bug: 374852566 Change-Id: I9c114c7a98edde2e12dba11b1853f8149cad3590 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6043745 Auto-Submit: Garima Chadha <[email protected]> Reviewed-by: Kim-Anh Tran <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]> Reviewed-by: Simon Zünd <[email protected]>
1 parent ef59052 commit 121f895

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

front_end/panels/profiler/HeapDetachedElementsView.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ export class DetachedElementsProfileType extends
138138
return i18nString(UIStrings.detachedElementsDescription);
139139
}
140140

141+
override isInstantProfile(): boolean {
142+
return true;
143+
}
144+
141145
// eslint-disable-next-line @typescript-eslint/naming-convention
142146
static readonly TypeId = 'DetachedElements';
143147
}

front_end/panels/profiler/ProfilesPanel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp
288288
}
289289

290290
updateProfileTypeSpecificUI(): void {
291+
if (this.selectedProfileType?.isInstantProfile()) {
292+
this.toggleRecordButton.toggleOnClick(false);
293+
}
291294
this.updateToggleRecordAction(this.toggleRecordAction.toggled());
292295
}
293296

0 commit comments

Comments
 (0)