Visit the URL to reproduce the crash. This crash was found in chrome : http://code.google.com/p/chromium/issues/detail?id=166100
Created attachment 183249 [details] Patch
Comment on attachment 183249 [details] Patch Looks good. r=me
Comment on attachment 183249 [details] Patch Clearing flags on attachment: 183249 Committed r140057: <http://trac.webkit.org/changeset/140057>
All reviewed patches have been landed. Closing bug.
Comment on attachment 183249 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=183249&action=review > Source/WebCore/ChangeLog:3 > + imageSmoothingEnabled frequent, unpredictable crashes This bug title implies that the issue is mysterious and unreproducible. But there is a test case, so the issue in in fact well understood. The right thing to do would be to re-title the bug to explain what exactly is being fixed, and to use the new title in ChangeLog too. > Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2403 > + GraphicsContext* c = drawingContext(); > + if (c) > + c->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone); A slightly better way to write this (and how we usually do it in WebKit) would be: if (GraphicsContext* context = drawingContext()) context->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone); Using "c" as variable name is particularly against WebKit coding culture. > LayoutTests/fast/canvas/canvas-imageSmoothingEnabled-zero-size.html:1 > + This blank line doesn't make a technical difference, but is surprising.
> > Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2403 > > + GraphicsContext* c = drawingContext(); > > + if (c) > > + c->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone); > > A slightly better way to write this (and how we usually do it in WebKit) would be: > > if (GraphicsContext* context = drawingContext()) > context->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone); > > Using "c" as variable name is particularly against WebKit coding culture. Really ? Because, in that file, I counted this line 40 times : GraphicsContext* c = drawingContext(); And not a single time is it declared within the if() statement. I was actually trying to keep the style of the file I was working in.
> Really ? Because, in that file, I counted this line 40 times : > GraphicsContext* c = drawingContext(); > And not a single time is it declared within the if() statement. I was actually trying to keep the style of the file I was working in. Past mistake are no excuses to avoid doing a good job. I completely agree with Alexey. The ChangeLog is poor and the code should have been better.