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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp

Issue 1841833002: Deal gracefully with null {GraphicsContext,SkPictureBuilder}.endRecording() results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/platform/graphics/paint/DrawingRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
index 202a06ec3a544304f8479de75e868293d11291c7..e0d3d3728d603546564bc04d630b2c052374b789 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -88,6 +88,10 @@ DrawingRecorder::~DrawingRecorder()
ASSERT(m_displayItemPosition == m_context.getPaintController().newDisplayItemList().size());
#endif
+ RefPtr<const SkPicture> recording = m_context.endRecording();
+ if (!recording)
+ return;
+
m_context.getPaintController().createAndAppend<DrawingDisplayItem>(m_displayItemClient
, m_displayItemType
, m_context.endRecording()

Powered by Google App Engine
This is Rietveld 408576698