Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js |
| index f075760e19d973c338122f44eb4ce567ed5c3ce4..1c9b716ed14447734270b9489f3d6920685f61d2 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js |
| @@ -18,6 +18,10 @@ WebInspector.TimelineController = class { |
| this._tracingModel = tracingModel; |
| this._targets = []; |
| WebInspector.targetManager.observeTargets(this); |
| + |
| + if (Runtime.experiments.isEnabled('timelineRuleUsageRecording')) { |
|
alph
2016/11/08 17:10:25
no need for {}
|
| + this._markUnusedCSS = WebInspector.settings.createSetting('timelineMarkUnusedCSS', false); |
| + } |
| } |
| /** |
| @@ -74,7 +78,10 @@ WebInspector.TimelineController = class { |
| tracingStoppedPromises.push(new Promise(resolve => this._tracingCompleteCallback = resolve)); |
| tracingStoppedPromises.push(this._stopProfilingOnAllTargets()); |
| this._target.tracingManager.stop(); |
| - tracingStoppedPromises.push(WebInspector.targetManager.resumeAllTargets()); |
| + |
| + if (!Runtime.experiments.isEnabled('timelineRuleUsageRecording') || !this._markUnusedCSS.get()) |
|
alph
2016/11/08 17:10:25
if an experiment is enabled after opening timeline
|
| + tracingStoppedPromises.push(WebInspector.targetManager.resumeAllTargets()); |
| + |
| Promise.all(tracingStoppedPromises).then(() => this._allSourcesFinished()); |
| this._delegate.loadingStarted(); |
| @@ -160,7 +167,10 @@ WebInspector.TimelineController = class { |
| * @param {function(?string)=} callback |
| */ |
| _startRecordingWithCategories(categories, enableJSSampling, callback) { |
| - WebInspector.targetManager.suspendAllTargets(); |
| + |
| + if (!Runtime.experiments.isEnabled('timelineRuleUsageRecording') || !this._markUnusedCSS.get()) |
|
alph
2016/11/08 17:10:25
This looks bad. We want to suspend targets not inv
|
| + WebInspector.targetManager.suspendAllTargets(); |
| + |
| var profilingStartedPromise = enableJSSampling && !Runtime.experiments.isEnabled('timelineTracingJSProfile') ? |
| this._startProfilingOnAllTargets() : |
| Promise.resolve(); |