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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.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/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 2e2133935801bc739eac56d46950ff10af6ff133..13c8f97dcd986988733736f005ef8536e1c4abec 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -312,7 +312,9 @@ public:
pictureBuilder.context().setPrinting(true);
float scale = spoolPage(pictureBuilder.context(), pageNumber);
- pictureBuilder.endRecording()->playback(canvas);
+ RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
+ if (recording)
+ recording->playback(canvas);
return scale;
}
@@ -371,7 +373,9 @@ public:
currentHeight += pageSizeInPixels.height() + 1;
}
- pictureBuilder.endRecording()->playback(canvas);
+ RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
+ if (recording)
+ recording->playback(canvas);
}
// DisplayItemClient methods

Powered by Google App Engine
This is Rietveld 408576698