Timeline: do not cache TimelineView (issue 1043953003 by caseq@chromium.org)

0 views
Skip to first unread message

ca...@chromium.org

unread,
Mar 30, 2015, 2:47:19 PM3/30/15
to yu...@chromium.org, al...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, loislo...@chromium.org, eustas...@chromium.org, malch...@chromium.org, yurys...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, sergey...@chromium.org, aandre...@chromium.org, kozyatins...@chromium.org
Reviewers: yurys, alph,

Description:
Timeline: do not cache TimelineView

We don't reset views other than active ones when new recording is done
and generally treat views as disposable upon mode change, so don't cache
TimelineView, rather re-create it as we do with FlameChart.

BUG=471600

Please review this at https://codereview.chromium.org/1043953003/

Base URL: svn://svn.chromium.org/blink/trunk

Affected files (+3, -14 lines):
M Source/devtools/front_end/timeline/TimelinePanel.js


Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js
b/Source/devtools/front_end/timeline/TimelinePanel.js
index
592cbb8ad66a7302ef7783a9aaf6b7bf321c3f36..a97872ffee70f2dffaea4245f701de6bd20f8b76
100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -220,16 +220,6 @@ WebInspector.TimelinePanel.prototype = {
},

/**
- * @return {!WebInspector.TimelineView}
- */
- _timelineView: function()
- {
- if (!this._lazyTimelineView)
- this._lazyTimelineView = new WebInspector.TimelineView(this,
this._model);
- return this._lazyTimelineView;
- },
-
- /**
* @return {!WebInspector.View}
*/
_layersView: function()
@@ -608,7 +598,9 @@ WebInspector.TimelinePanel.prototype = {
this._flameChart = null;
this._filterBar.filterButton().setEnabled(true);

this._filtersContainer.classList.toggle("hidden", !this._filterBar.filtersToggled());
- this._addModeView(this._timelineView());
+ var timelineView = new WebInspector.TimelineView(this,
this._model)
+ this._addModeView(timelineView);
+ timelineView.setFrameModel(isFrameMode ? this._frameModel() :
null);
}

if (this._captureMemorySetting.get()) {
@@ -618,9 +610,6 @@ WebInspector.TimelinePanel.prototype = {
}

var mainTarget = WebInspector.targetManager.mainTarget();
- if (this._lazyTimelineView)
- this._lazyTimelineView.setFrameModel(isFrameMode ?
this._frameModel() : null);
-
this._overviewPane.setOverviewControls(this._overviewControls);
this.doResize();
this._selection = null;


yu...@chromium.org

unread,
Mar 31, 2015, 3:08:23 AM3/31/15
to ca...@chromium.org, al...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, loislo...@chromium.org, eustas...@chromium.org, malch...@chromium.org, yurys...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, sergey...@chromium.org, aandre...@chromium.org, kozyatins...@chromium.org

commi...@chromium.org

unread,
Mar 31, 2015, 3:19:55 AM3/31/15
to ca...@chromium.org, yu...@chromium.org, al...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, loislo...@chromium.org, eustas...@chromium.org, malch...@chromium.org, yurys...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, sergey...@chromium.org, aandre...@chromium.org, kozyatins...@chromium.org

commi...@chromium.org

unread,
Mar 31, 2015, 4:42:00 AM3/31/15
to ca...@chromium.org, yu...@chromium.org, al...@chromium.org, blink-...@chromium.org, caseq...@chromium.org, loislo...@chromium.org, eustas...@chromium.org, malch...@chromium.org, yurys...@chromium.org, lushnik...@chromium.org, pfeldma...@chromium.org, apavlo...@chromium.org, devtools...@chromium.org, sergey...@chromium.org, aandre...@chromium.org, kozyatins...@chromium.org
Reply all
Reply to author
Forward
0 new messages