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

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 caseq 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..ea08cad8902b9e8cf9dd1aa3a29e7a76b19a7808 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();
@@ -614,10 +612,14 @@ WebInspector.TimelinePanel.prototype = {
_startRecording: function(userInitiated)
{
console.assert(!this._statusPane, "Status pane is already opened.");
+ var mainTarget = WebInspector.targetManager.mainTarget();
+ if (!mainTarget)
+ return;
this._setState(WebInspector.TimelinePanel.State.StartPending);
this._showRecordingStarted();
this._autoRecordGeneration = userInitiated ? null : Symbol("Generation");
+ this._controller = new WebInspector.TimelineController(mainTarget, this, this._tracingModel);
this._controller.startRecording(true, this._captureJSProfileSetting.get(), this._captureMemorySetting.get(), this._captureLayersAndPicturesSetting.get(), this._captureFilmStripSetting && this._captureFilmStripSetting.get());
for (var i = 0; i < this._overviewControls.length; ++i)
@@ -639,6 +641,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