RESOLVED FIXED 50631
GeneratedImage::drawPattern() crashes when it fails to create ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=50631
Summary GeneratedImage::drawPattern() crashes when it fails to create ImageBuffer
Yong Li
Reported 2010-12-07 08:20:38 PST
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; }
Attachments
the patch (1.36 KB, patch)
2010-12-07 09:23 PST, Yong Li
no flags
Yong Li
Comment 1 2010-12-07 09:23:15 PST
Created attachment 75822 [details] the patch
Darin Adler
Comment 2 2010-12-07 09:42:22 PST
Comment on attachment 75822 [details] the patch I silently drawing nothing the most useful behavior? Do callers need to know nothing was drawn?
WebKit Review Bot
Comment 3 2010-12-07 10:00:48 PST
Attachment 75822 [details] did not pass style-queue: Failed to run "[u'git', u'reset', u'--hard', u'refs/remotes/trunk']" exit_code: 128 error: Could not write new index file. fatal: Could not reset index file to revision 'refs/remotes/trunk'. If any of these errors are false positives, please file a bug against check-webkit-style.
Yong Li
Comment 4 2010-12-07 10:59:03 PST
(In reply to comment #2) > (From update of attachment 75822 [details]) > I silently drawing nothing the most useful behavior? Do callers need to know nothing was drawn? ImageBuffer::create() rarely fails currently. Probably the best solution is never let ImageBuffer::create() fail, and let it do some alternative job when it cannot create platform resource.
WebKit Review Bot
Comment 5 2010-12-07 11:01:55 PST
Attachment 75822 [details] did not pass style-queue: Failed to run "[u'git', u'reset', u'--hard', u'refs/remotes/trunk']" exit_code: 128 error: Could not write new index file. fatal: Could not reset index file to revision 'refs/remotes/trunk'. If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 6 2010-12-07 12:03:15 PST
Attachment 75822 [details] did not pass style-queue: Failed to run "[u'git', u'reset', u'--hard', u'refs/remotes/trunk']" exit_code: 128 error: Could not write new index file. fatal: Could not reset index file to revision 'refs/remotes/trunk'. If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 7 2010-12-07 21:41:13 PST
Attachment 75822 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/update-webkit']" exit_code: 2 Updating OpenSource Incomplete data: Delta source ended unexpectedly at /usr/lib/git-core/git-svn line 5061 Died at WebKitTools/Scripts/update-webkit line 132. If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 8 2010-12-08 00:18:17 PST
Comment on attachment 75822 [details] the patch Rejecting patch 75822 from commit-queue. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=eseidel-cq-sl', 'build', '--no-clean', '--no-update', '--build-style=both']" exit_code: 1 ERROR: Working directory has local commits, pass --force-clean to continue. Full output: http://queues.webkit.org/results/6730115
WebKit Commit Bot
Comment 9 2010-12-09 09:32:39 PST
The commit-queue encountered the following flaky tests while processing attachment 75822 [details]: webarchive/test-link-rel-icon.html http/tests/loading/basic-credentials-sent-automatically.html Please file bugs against the tests. These tests were authored by beidson@apple.com and ddkilzer@webkit.org. The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2010-12-09 10:27:05 PST
Comment on attachment 75822 [details] the patch Clearing flags on attachment: 75822 Committed r73622: <http://trac.webkit.org/changeset/73622>
WebKit Commit Bot
Comment 11 2010-12-09 10:27:10 PST
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 12 2010-12-09 11:05:27 PST
http://trac.webkit.org/changeset/73622 might have broken GTK Linux 64-bit Debug
Note You need to log in before you can comment on or make changes to this bug.