RESOLVED FIXED 32176
Test that an image's size is valid before reading it.
https://bugs.webkit.org/show_bug.cgi?id=32176
Summary Test that an image's size is valid before reading it.
Adam Langley
Reported 2009-12-04 15:32:00 PST
Previously, an image that failed to load (m_failed == true) would trigger an assertion failure when WebKit tried to get its size.
Attachments
patch (3.40 KB, patch)
2009-12-04 15:33 PST, Adam Langley
darin: review-
patch (12.66 KB, patch)
2009-12-08 17:56 PST, Adam Langley
no flags
patch (3.42 KB, patch)
2009-12-08 17:57 PST, Adam Langley
fishd: review+
eric: commit-queue-
Adam Langley
Comment 1 2009-12-04 15:33:24 PST
Created attachment 44338 [details] patch (contains a binary file, so please don't cq+!)
Darin Adler
Comment 2 2009-12-04 15:45:56 PST
Comment on attachment 44338 [details] patch > // Zero-height images can cause problems for some ports. If we have an > // empty image dimension, just bail. > - if (size().isEmpty()) > + if (isSizeAvailable() && size().isEmpty()) > return 0; This changes the logic. If the size is not available, this now continues and creates a native image. But the old code would return 0 if the size was not available. You should reverse the logic. if (!isSizeAvailable() || ...
Adam Langley
Comment 3 2009-12-08 17:56:05 PST
Created attachment 44503 [details] patch I originally thought that size() would return random memory in the case that it hadn't been set, but now I notice that it's constructed to 0, 0. So I've changed the logic as suggested.
Adam Langley
Comment 4 2009-12-08 17:57:17 PST
Created attachment 44504 [details] patch Crap. Wrong patch. Corrected.
Eric Seidel (no email)
Comment 5 2009-12-28 22:40:36 PST
Attachment 44504 [details] was posted by a committer and has review+, assigning to Adam Langley for commit.
Eric Seidel (no email)
Comment 6 2009-12-28 23:19:22 PST
Comment on attachment 44504 [details] patch This can't be cq'd because it's missing the binary data.
Adam Langley
Comment 7 2009-12-29 09:49:03 PST
Eric Seidel (no email)
Comment 8 2010-06-16 20:38:10 PDT
This test seems to be (at least recently) crashing on Gtk.
Note You need to log in before you can comment on or make changes to this bug.