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

Unified Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp

Issue 2115493004: Make sure RecordingImageBufferSurface's current frame is valid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
index e9b89e7fa8ec5881a70570e7158e1f190d053590..f921797026164ff8b99681c24537d1014264917e 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
@@ -258,8 +258,8 @@ void RecordingImageBufferSurface::didDraw(const FloatRect& rect)
bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallbackReason)
{
- ASSERT(!m_fallbackSurface);
- ASSERT(m_currentFrame);
+ CHECK(!m_fallbackSurface);
+ CHECK(m_currentFrame);
ASSERT(m_currentFrame->getRecordingCanvas());
ASSERT(fallbackReason);
ASSERT(*fallbackReason == FallbackReasonUnknown);
@@ -270,7 +270,8 @@ bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallback
m_previousFrame = fromSkSp(m_currentFrame->finishRecordingAsPicture());
initializeCurrentFrame();
}
- return m_currentFrame.get();
+ CHECK(m_currentFrame);
+ return true;
}
if (!m_frameWasCleared) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698