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

Unified Diff: third_party/WebKit/Source/core/paint/SVGShapePainter.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/core/paint/SVGShapePainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
index 164a531636222a5ade29705fcbeb3e057d7aa535..7b8de068ee80276e0788c4146ee800412a766179 100644
--- a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
@@ -204,7 +204,9 @@ void SVGShapePainter::paintMarkers(const PaintInfo& paintInfo, const FloatRect&
markerPaintInfo.m_cullRect.m_rect = LayoutRect::infiniteIntRect();
paintMarker(markerPaintInfo, *marker, (*markerPositions)[i], strokeWidth);
- pictureBuilder.endRecording()->playback(paintInfo.context.canvas());
+ RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
+ if (recording)
+ recording->playback(paintInfo.context.canvas());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698