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

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

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] No RTM for non-browser targets Created 4 years, 4 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: 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 6bc49a7d197ea8434c9f6ec5d4a3dacffa662b13..07f1cbb1db634a74bba992f7274cd46d6f57babe 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
@@ -172,14 +172,17 @@ WebInspector.TimelineController.prototype = {
var options = "sampling-frequency=" + samplingFrequencyHz;
var target = this._target;
var tracingManager = target.tracingManager;
- target.resourceTreeModel.suspendReload();
+ var resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target);
+ if (resourceTreeModel)
+ resourceTreeModel.suspendReload();
dgozman 2016/08/19 20:23:37 Didn't we agree to move suspend/resume to target m
eostroukhov 2016/08/20 01:22:31 Done.
profilingStartedPromise.then(tracingManager.start.bind(tracingManager, this, categories, options, onTraceStarted));
/**
* @param {?string} error
*/
function onTraceStarted(error)
{
- target.resourceTreeModel.resumeReload();
+ if (resourceTreeModel)
+ resourceTreeModel.resumeReload();
if (callback)
callback(error);
}

Powered by Google App Engine
This is Rietveld 408576698