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

Unified Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js

Issue 2845813003: [DevTools] Host paint profiles in PaintProfilerModel (Closed)
Patch Set: addressed comments Created 3 years, 8 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_model/TimelineFrameModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
index 26792154384c1ab891daf8d919cbbc7b1ebc08ea..5351a44a412fae75442cff7a01990815f03962c8 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineFrameModel.js
@@ -505,10 +505,11 @@ TimelineModel.LayerPaintEvent = class {
* @return !Promise<?{rect: !Array<number>, snapshot: !SDK.PaintProfilerSnapshot}>}
*/
snapshotPromise() {
+ var paintProfilerModel = this._target && this._target.model(SDK.PaintProfilerModel);
return this.picturePromise().then(picture => {
- if (!picture || !this._target)
+ if (!picture || !paintProfilerModel)
return null;
- return SDK.PaintProfilerSnapshot.load(this._target, picture.serializedPicture)
+ return paintProfilerModel.loadSnapshot(picture.serializedPicture)
.then(snapshot => snapshot ? {rect: picture.rect, snapshot: snapshot} : null);
});
}

Powered by Google App Engine
This is Rietveld 408576698