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

Unified Diff: src/effects/SkDropShadowImageFilter.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: New serialization method Created 7 years, 3 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: src/effects/SkDropShadowImageFilter.cpp
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp
index 75a86689c0b9ad796dc74aee80d15b1ac8c720d9..4fc29bae837016f514bfd93fe08aa83067dcf588 100644
--- a/src/effects/SkDropShadowImageFilter.cpp
+++ b/src/effects/SkDropShadowImageFilter.cpp
@@ -29,6 +29,9 @@ SkDropShadowImageFilter::SkDropShadowImageFilter(SkFlattenableReadBuffer& buffer
fDy = buffer.readScalar();
fSigma = buffer.readScalar();
fColor = buffer.readColor();
+ buffer.validate(SkScalarIsFinite(fDx) &&
+ SkScalarIsFinite(fDy) &&
+ SkScalarIsFinite(fSigma));
}
void SkDropShadowImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const

Powered by Google App Engine
This is Rietveld 408576698