Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 2566983004: DevTools: Fix profiler private field accesses. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
index d30c0f9054a8fa68232cf5100f2ec63c15272683..8113259c349588ecdf1efffa640097a9751d96fe 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
@@ -220,12 +220,9 @@ Profiler.ProfileType = class extends Common.Object {
profileBeingRecordedRemoved() {
}
- _reset() {
- var profiles = this._profiles.slice(0);
- for (var i = 0; i < profiles.length; ++i)
- this._disposeProfile(profiles[i]);
+ reset() {
+ this._profiles.slice(0).forEach(this._disposeProfile.bind(this));
this._profiles = [];
-
this._nextProfileUid = 1;
}
@@ -598,9 +595,7 @@ Profiler.ProfilesPanel = class extends UI.PanelWithSidebar {
}
_reset() {
- var types = Profiler.ProfileTypeRegistry.instance.profileTypes();
- for (var i = 0; i < types.length; i++)
- types[i]._reset();
+ Profiler.ProfileTypeRegistry.instance.profileTypes().forEach(type => type.reset());
delete this.visibleView;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/ProfileView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698