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

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 1683983002: Change an existing check to ASSERT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/core/frame/ImageBitmap.cpp
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 57a9c7255c72eff4c8e544c8e826a31a9fcb571d..2db613025bebedc7c337092e45213d78c17dd204 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -43,9 +43,8 @@ static inline IntRect normalizeRect(const IntRect& rect)
static bool frameIsValid(const SkBitmap& frameBitmap)
{
- ASSERT(!frameBitmap.isNull() && !frameBitmap.empty());
- return frameBitmap.isImmutable()
- && frameBitmap.colorType() == kN32_SkColorType;
+ ASSERT(!frameBitmap.isNull() && !frameBitmap.empty() && frameBitmap.isImmutable());
+ return frameBitmap.colorType() == kN32_SkColorType;
}
static SkImage* flipSkImageVertically(SkImage* input)
@@ -104,7 +103,6 @@ static PassRefPtr<StaticBitmapImage> cropImage(Image* image, const IntRect& crop
SkBitmap bitmap = frame->bitmap();
if (!frameIsValid(bitmap))
return nullptr;
- ASSERT(bitmap.isImmutable());
skiaImage = adoptRef(SkImage::NewFromBitmap(bitmap));
}
« 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