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

Unified Diff: Source/devtools/front_end/profiler/HeapSnapshotView.js

Issue 356843008: Fix private member access violations in profiler module (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed apavlov's comments Created 6 years, 6 months 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
Index: Source/devtools/front_end/profiler/HeapSnapshotView.js
diff --git a/Source/devtools/front_end/profiler/HeapSnapshotView.js b/Source/devtools/front_end/profiler/HeapSnapshotView.js
index 0b324c1ff2f8afaeac2a897e04a3477caa4497f0..678660d1c82fcedb6efc490c83c5e15b6a039e8e 100644
--- a/Source/devtools/front_end/profiler/HeapSnapshotView.js
+++ b/Source/devtools/front_end/profiler/HeapSnapshotView.js
@@ -49,7 +49,7 @@ WebInspector.HeapSnapshotView = function(dataDisplayDelegate, profile)
profile.profileType().addEventListener(WebInspector.HeapSnapshotProfileType.SnapshotReceived, this._onReceiveSnapshot, this);
profile.profileType().addEventListener(WebInspector.ProfileType.Events.RemoveProfileHeader, this._onProfileHeaderRemoved, this);
- if (profile._profileType.id === WebInspector.TrackingHeapSnapshotProfileType.TypeId) {
+ if (profile.profileType().id === WebInspector.TrackingHeapSnapshotProfileType.TypeId) {
this._trackingOverviewGrid = new WebInspector.HeapTrackingOverviewGrid(profile);
this._trackingOverviewGrid.addEventListener(WebInspector.HeapTrackingOverviewGrid.IdsRangeChanged, this._onIdsRangeChanged.bind(this));
}
@@ -1374,7 +1374,7 @@ WebInspector.TrackingHeapSnapshotProfileType.prototype = {
*/
function didTakeHeapSnapshot(error)
{
- var profile = this._profileBeingRecorded;
+ var profile = this.profileBeingRecorded();
if (!profile)
return;
profile._finishLoad();
@@ -1445,7 +1445,7 @@ WebInspector.TrackingHeapSnapshotProfileType.prototype = {
*/
WebInspector.HeapProfileHeader = function(target, type, title, hasAllocationStacks)
{
- WebInspector.ProfileHeader.call(this, target, type, title || WebInspector.UIString("Snapshot %d", type._nextProfileUid));
+ WebInspector.ProfileHeader.call(this, target, type, title || WebInspector.UIString("Snapshot %d", type.nextProfileUid()));
this._hasAllocationStacks = !!hasAllocationStacks;
this.maxJSObjectId = -1;
/**
@@ -1799,7 +1799,7 @@ WebInspector.HeapTrackingOverviewGrid = function(heapProfileHeader)
this._profileSamples = heapProfileHeader._profileSamples;
if (heapProfileHeader.profileType().profileBeingRecorded() === heapProfileHeader) {
- this._profileType = heapProfileHeader._profileType;
+ this._profileType = heapProfileHeader.profileType();
this._profileType.addEventListener(WebInspector.TrackingHeapSnapshotProfileType.HeapStatsUpdate, this._onHeapStatsUpdate, this);
this._profileType.addEventListener(WebInspector.TrackingHeapSnapshotProfileType.TrackingStopped, this._onStopTracking, this);
}
« no previous file with comments | « Source/devtools/front_end/profiler/CanvasProfileView.js ('k') | Source/devtools/front_end/profiler/ProfilesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698