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

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: change to CHECK 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..8475428c0f1982a8d2a13bd81f4db3cb47d20378 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
@@ -259,8 +259,8 @@ void RecordingImageBufferSurface::didDraw(const FloatRect& rect)
bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallbackReason)
{
ASSERT(!m_fallbackSurface);
Justin Novosad 2016/07/04 14:38:55 I meant this one.
xidachen 2016/07/04 14:43:36 Done.
- ASSERT(m_currentFrame);
- ASSERT(m_currentFrame->getRecordingCanvas());
+ CHECK(m_currentFrame);
+ CHECK(m_currentFrame->getRecordingCanvas());
ASSERT(fallbackReason);
ASSERT(*fallbackReason == FallbackReasonUnknown);
@@ -270,6 +270,7 @@ bool RecordingImageBufferSurface::finalizeFrameInternal(FallbackReason* fallback
m_previousFrame = fromSkSp(m_currentFrame->finishRecordingAsPicture());
initializeCurrentFrame();
}
+ CHECK(m_currentFrame);
return m_currentFrame.get();
Justin Novosad 2016/07/04 14:38:55 tautology: just return true here.
xidachen 2016/07/04 14:43:36 Done.
}
« 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