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

Unified Diff: Source/devtools/front_end/timeline/TimelineLayersView.js

Issue 402633002: DevTools: Remove redundant dependency on target from TimelineFrameModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address caseq comments 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/timeline/TimelineLayersView.js
diff --git a/Source/devtools/front_end/timeline/TimelineLayersView.js b/Source/devtools/front_end/timeline/TimelineLayersView.js
index c8a907ffd9c7828603339f5d1483cb443c4cf8bb..2159e2f34f855c58566a34924f72cbf8caa82424 100644
--- a/Source/devtools/front_end/timeline/TimelineLayersView.js
+++ b/Source/devtools/front_end/timeline/TimelineLayersView.js
@@ -47,14 +47,13 @@ WebInspector.TimelineLayersView.prototype = {
{
var layerTree;
- this._weakTarget = this._deferredLayerTree.weakTarget();
+ this._target = this._deferredLayerTree.target();
var originalTiles = this._paintTiles;
var tilesReadyBarrier = new CallbackBarrier();
this._deferredLayerTree.resolve(tilesReadyBarrier.createCallback(onLayersReady));
- var target = this._weakTarget.get();
- if (target) {
+ if (this._target) {
for (var i = 0; this._paints && i < this._paints.length; ++i)
- WebInspector.PaintProfilerSnapshot.load(target, this._paints[i].picture, tilesReadyBarrier.createCallback(onSnapshotLoaded.bind(this, this._paints[i])));
+ WebInspector.PaintProfilerSnapshot.load(this._target, this._paints[i].picture, tilesReadyBarrier.createCallback(onSnapshotLoaded.bind(this, this._paints[i])));
}
tilesReadyBarrier.callWhenDone(onLayersAndTilesReady.bind(this));
@@ -128,9 +127,8 @@ WebInspector.TimelineLayersView.prototype = {
node.highlightForTwoSeconds();
return;
}
- var target = this._weakTarget.get();
- if (target)
- target.domModel.hideDOMNodeHighlight();
+ if (this._target)
+ this._target.domModel.hideDOMNodeHighlight();
},
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameModel.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698