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

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

Issue 717243002: Timeline: do not imply event.thread.target is the main target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: avoid keep stale model in TimelineFrameModel Created 6 years, 1 month 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: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index de243fa4f2387d826ce13df20225ab87f9548cd0..36b44ad095d50ea58f7c884fe6bf67c0eb6e34d6 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -224,7 +224,7 @@ WebInspector.TimelinePanel.prototype = {
{
if (!this._lazyFrameModel) {
var tracingFrameModel = new WebInspector.TracingTimelineFrameModel();
- tracingFrameModel.addTraceEvents(this._model.inspectedTargetEvents(), this._tracingModel.sessionId() || "");
+ tracingFrameModel.addTraceEvents(this._model.target(), this._model.inspectedTargetEvents(), this._tracingModel.sessionId() || "");
this._lazyFrameModel = tracingFrameModel;
}
return this._lazyFrameModel;
@@ -789,7 +789,7 @@ WebInspector.TimelinePanel.prototype = {
this._updateToggleTimelineButton(false);
if (this._lazyFrameModel) {
this._lazyFrameModel.reset();
- this._lazyFrameModel.addTraceEvents(this._model.inspectedTargetEvents(), this._tracingModel.sessionId());
+ this._lazyFrameModel.addTraceEvents(this._model.target(), this._model.inspectedTargetEvents(), this._tracingModel.sessionId());
}
this.requestWindowTimes(this._model.minimumRecordTime(), this._model.maximumRecordTime());
this._refreshViews();
@@ -994,7 +994,8 @@ WebInspector.TimelinePanel.prototype = {
*/
_showEventInPaintProfiler: function(event, isCloseable)
{
- if (!event.picture)
+ var target = this._model.target();
+ if (!event.picture || !target)
return;
var paintProfilerView = this._paintProfilerView();
if (!this._detailsView.hasTab(WebInspector.TimelinePanel.DetailsTab.PaintProfiler))
@@ -1005,7 +1006,7 @@ WebInspector.TimelinePanel.prototype = {
{
if (!result || !result["skp64"])
return;
- paintProfilerView.setPicture(event.thread.target(), result["skp64"]);
+ paintProfilerView.setPicture(target, result["skp64"]);
}
},
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModel.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698