[Webkit-unassigned] [Bug 50631] New: GeneratedImage::drawPattern() crashes when it fails to create ImageBuffer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 7 08:20:38 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=50631

           Summary: GeneratedImage::drawPattern() crashes when it fails to
                    create ImageBuffer
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Images
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yong.li.webkit at gmail.com
                CC: staikos at kde.org


void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
                                 const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect)
{
    ...
    OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(adjustedSize);
    ASSERT(imageBuffer.get());

Why do we assert here? ImageBuffer::create() is allowed to return 0:

        static PassOwnPtr<ImageBuffer> create(const IntSize& size, ImageColorSpace colorSpace = DeviceRGB)
        {
            bool success = false;
            OwnPtr<ImageBuffer> buf(new ImageBuffer(size, colorSpace, success));
            if (success)
                return buf.release();
            return 0;
        }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list