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

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: Rebased Created 4 years, 5 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 3ce1bc2a3b2d5eb85e22af33d1ca022a59eb61d4..3e5169bb22d949b592292d75945cbbf07f62e5fa 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js
@@ -170,14 +170,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();
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