Bug 1095510 - See if ClearRect has weird data. r=jmuizelaar

--HG--
extra : rebase_source : bc587fc96d30cac3ef829f8ceabc72aae6831a98
This commit is contained in:
Milan Sreckovic 2014-12-11 12:05:51 -05:00
Родитель 90eeb3a41a
Коммит c792f5f186
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -1046,6 +1046,12 @@ DrawTargetCairo::ClearRect(const Rect& aRect)
{
AutoPrepareForDrawing prep(this, mContext);
if (!mContext || aRect.Width() <= 0 || aRect.Height() <= 0 ||
!IsFinite(aRect.X()) || !IsFinite(aRect.Width()) ||
!IsFinite(aRect.Y()) || !IsFinite(aRect.Height())) {
gfxCriticalError() << "ClearRect with invalid argument " << gfx::hexa(mContext) << " with " << aRect.Width() << "x" << aRect.Height() << " [" << aRect.X() << ", " << aRect.Y() << "]";
}
cairo_set_antialias(mContext, CAIRO_ANTIALIAS_NONE);
cairo_new_path(mContext);
cairo_set_operator(mContext, CAIRO_OPERATOR_CLEAR);