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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js

Issue 1807093002: DevTools: Resume targets *after* stopping timeline recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comment Created 4 years, 9 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 | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index 1c4b2dc0d7d0db8d227c8a4624239982470a6096..ae3eb290e70ef95df2c03a0df85cbaec02e2e705 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -58,8 +58,6 @@ WebInspector.TimelinePanel = function()
if (Runtime.experiments.isEnabled("timelineLatencyInfo"))
this._irModel = new WebInspector.TimelineIRModel();
- this._controller = new WebInspector.TimelineController(this, this._tracingModel);
-
if (Runtime.experiments.isEnabled("cpuThrottling"))
this._cpuThrottlingManager = new WebInspector.CPUThrottlingManager();
@@ -609,11 +607,23 @@ WebInspector.TimelinePanel.prototype = {
},
/**
+ * @return {?WebInspector.TimelineController}
+ */
+ _createController: function()
caseq 2016/03/17 21:28:22 let's inline this.
alph 2016/03/17 21:36:50 Done.
+ {
+ var mainTarget = WebInspector.targetManager.mainTarget();
+ return mainTarget ? new WebInspector.TimelineController(mainTarget, this, this._tracingModel) : null;
+ },
+
+ /**
* @param {boolean} userInitiated
*/
_startRecording: function(userInitiated)
{
console.assert(!this._statusPane, "Status pane is already opened.");
+ this._controller = this._createController();
+ if (!this._controller)
+ return;
this._setState(WebInspector.TimelinePanel.State.StartPending);
this._showRecordingStarted();
@@ -639,6 +649,7 @@ WebInspector.TimelinePanel.prototype = {
this._setState(WebInspector.TimelinePanel.State.StopPending);
this._autoRecordGeneration = null;
this._controller.stopRecording();
+ this._controller = null;
this._setUIControlsEnabled(true);
},
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698