Bug 58501

Summary: Use HTMLImageElement in Canvas 2D / WebGL before response is ready causes crash
Product: WebKit Reporter: Zhenyao Mo <zmo>
Component: CanvasAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, darin, gman, kbr, mdelaney7, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch kbr: review+

Zhenyao Mo
Reported 2011-04-13 18:38:35 PDT
This is because cachedImage()->response().url().string().impl() is null, and hash(null) is not expected, thus crash.
Attachments
Patch (3.63 KB, patch)
2011-04-14 18:53 PDT, Zhenyao Mo
kbr: review+
Zhenyao Mo
Comment 1 2011-04-13 18:39:19 PDT
I am working on a fix for WebGL. If someone else more familiar with canvas 2d could fix this on the canvas 2d side, it would be great!
Zhenyao Mo
Comment 2 2011-04-13 18:42:42 PDT
A test case for WebGL: svn checkout https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl -r 14468 sdk/tests/conformance/tex-image-and-sub-image-2d-with-image.html Current behavior: crash correct behavior: no crash
Zhenyao Mo
Comment 3 2011-04-14 18:53:06 PDT
Zhenyao Mo
Comment 4 2011-04-14 18:54:49 PDT
This patch makes sure WebGL won't process an HTMLImageElement if it's not ready yet. mdelaney is getting another patch ready for the rest.
Kenneth Russell
Comment 5 2011-04-15 10:33:05 PDT
Comment on attachment 89716 [details] Patch Looks good.
Zhenyao Mo
Comment 6 2011-04-15 11:02:12 PDT
Note You need to log in before you can comment on or make changes to this bug.