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

Unified Diff: Source/devtools/front_end/profiler/ProfilesPanel.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
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotView.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/profiler/ProfilesPanel.js
diff --git a/Source/devtools/front_end/profiler/ProfilesPanel.js b/Source/devtools/front_end/profiler/ProfilesPanel.js
index ccf5e9895f60e8dd0310bc215ea66bffea65415a..fcb64763d8dd69ca4b19764d5504b77cc59a4231 100644
--- a/Source/devtools/front_end/profiler/ProfilesPanel.js
+++ b/Source/devtools/front_end/profiler/ProfilesPanel.js
@@ -304,7 +304,7 @@ WebInspector.ProfileType.DataDisplayDelegate.prototype = {
*/
WebInspector.ProfileHeader = function(target, profileType, title)
{
- this._targetObserver = new WebInspector.TargetObserver(target);
+ this._weakTarget = target ? target.weakReference() : new WeakReference(null);
this._profileType = profileType;
this.title = title;
this.uid = profileType._nextProfileUid++;
@@ -335,7 +335,15 @@ WebInspector.ProfileHeader.prototype = {
*/
target: function()
{
- return this._targetObserver.target();
+ return this._weakTarget.get();
+ },
+
+ /**
+ * @return {!WeakReference.<!WebInspector.Target>}
+ */
+ weakTarget: function()
+ {
+ return this._weakTarget;
},
/**
« no previous file with comments | « Source/devtools/front_end/profiler/HeapSnapshotView.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698