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

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

Issue 388303002: DevTools: Get rid of WebInspector.TargetObserver (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/HeapSnapshotDataGrids.js
diff --git a/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js b/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js
index 0f156096704b933ed70fc369b0f54005f042e821..43814b0483648bdee28cfe2dd0263cc7fc53098d 100644
--- a/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js
+++ b/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js
@@ -960,10 +960,10 @@ WebInspector.HeapSnapshotDiffDataGrid.prototype = {
/**
* @constructor
* @extends {WebInspector.HeapSnapshotViewportDataGrid}
- * @param {?WebInspector.Target} target
+ * @param {!WeakReference.<!WebInspector.Target>} weakTarget
* @param {!WebInspector.ProfileType.DataDisplayDelegate} dataDisplayDelegate
*/
-WebInspector.AllocationDataGrid = function(target, dataDisplayDelegate)
+WebInspector.AllocationDataGrid = function(weakTarget, dataDisplayDelegate)
{
var columns = [
{id: "liveCount", title: WebInspector.UIString("Live Count"), width: "72px", sortable: true},
@@ -973,7 +973,7 @@ WebInspector.AllocationDataGrid = function(target, dataDisplayDelegate)
{id: "name", title: WebInspector.UIString("Function"), disclosure: true, sortable: true},
];
WebInspector.HeapSnapshotViewportDataGrid.call(this, dataDisplayDelegate, columns);
- this._targetObserver = new WebInspector.TargetObserver(target);
+ this._weakTarget = weakTarget;
this._linkifier = new WebInspector.Linkifier();
}
@@ -984,7 +984,7 @@ WebInspector.AllocationDataGrid.prototype = {
*/
target: function()
{
- return this._targetObserver.target();
+ return this._weakTarget.get();
},
dispose: function()
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileView.js ('k') | Source/devtools/front_end/profiler/HeapSnapshotView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698