豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 27aec29

Browse files
szuendDevtools-frontend LUCI CQ
authored andcommitted
Revert "[Memory] Unobserved isolates on panel hide"
This reverts commit 6d92651. Reason for revert: Breaks the memory panel: Switching back and forth between the memory panel and every other panel will accumulate isolates in the list view. Original change's description: > [Memory] Unobserved isolates on panel hide > > This stops the `Runtime.getHeapUsage` getting called in the > background. > Mostly done to make it easier to debug DevTools on DevTools. > But should be a small performance win as well. > > Bug: none > Change-Id: Ief3e699436e61d3aa6917e5205c33e8f221c9d30 > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7213820 > Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> > Reviewed-by: Danil Somsikov <dsv@chromium.org> > Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Bug: none Change-Id: If2614db8d9254452b02f3b3b5ca57d9c34f2b6ac Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7513267 Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Simon Zünd <szuend@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
1 parent 1289b42 commit 27aec29

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

front_end/core/sdk/IsolateManager.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ export class IsolateManager extends Common.ObjectWrapper.ObjectWrapper<EventType
4949
}
5050
}
5151

52-
unobserveIsolates(observer: Observer): void {
53-
this.#observers.delete(observer);
54-
if (!this.#observers.size) {
55-
this.#pollId++;
56-
}
57-
}
58-
5952
modelAdded(model: RuntimeModel): void {
6053
void this.#modelAdded(model);
6154
}

front_end/panels/profiler/IsolateSelector.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
8888
this.totalTrendDiv, i18nString(UIStrings.totalPageJsHeapSizeChangeTrend, {PH1: trendIntervalMinutes}));
8989
UI.Tooltip.Tooltip.install(this.totalValueDiv, i18nString(UIStrings.totalPageJsHeapSizeAcrossAllVm));
9090

91+
SDK.IsolateManager.IsolateManager.instance().observeIsolates(this);
9192
SDK.TargetManager.TargetManager.instance().addEventListener(
9293
SDK.TargetManager.Events.NAME_CHANGED, this.targetChanged, this);
9394
SDK.TargetManager.TargetManager.instance().addEventListener(
@@ -96,7 +97,6 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
9697

9798
override wasShown(): void {
9899
super.wasShown();
99-
SDK.IsolateManager.IsolateManager.instance().observeIsolates(this);
100100
SDK.IsolateManager.IsolateManager.instance().addEventListener(
101101
SDK.IsolateManager.Events.MEMORY_CHANGED, this.heapStatsChanged, this);
102102
}
@@ -105,7 +105,6 @@ export class IsolateSelector extends UI.Widget.VBox implements UI.ListControl.Li
105105
super.willHide();
106106
SDK.IsolateManager.IsolateManager.instance().removeEventListener(
107107
SDK.IsolateManager.Events.MEMORY_CHANGED, this.heapStatsChanged, this);
108-
SDK.IsolateManager.IsolateManager.instance().unobserveIsolates(this);
109108
}
110109

111110
isolateAdded(isolate: SDK.IsolateManager.Isolate): void {

0 commit comments

Comments
 (0)