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

Unified Diff: third_party/WebKit/Source/web/PageWidgetDelegate.cpp

Issue 1841833002: Deal gracefully with null {GraphicsContext,SkPictureBuilder}.endRecording() results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't end recording twice in DrawingRecorder. Created 4 years, 9 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/web/PageWidgetDelegate.cpp
diff --git a/third_party/WebKit/Source/web/PageWidgetDelegate.cpp b/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
index e2c41392f90da57f9594eb456f320a8d51b081f9..38d2b90e8cc963ebf75f39732bebae55c72875ed 100644
--- a/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
+++ b/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
@@ -93,7 +93,9 @@ static void paintInternal(Page& page, WebCanvas* canvas,
paintContext.fillRect(dirtyRect, Color::white);
}
}
- pictureBuilder.endRecording()->playback(canvas);
+ RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
+ if (recording)
+ recording->playback(canvas);
}
void PageWidgetDelegate::paint(Page& page, WebCanvas* canvas,

Powered by Google App Engine
This is Rietveld 408576698