Bug 124822

Summary: ImageBuffer::create should return a unique_ptr instead of OwnPtr.
Product: WebKit Reporter: Brian Burg <burg>
Component: ImagesAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, darin, dino, d-r, eflews.bot, eric.carlson, esprehn+autocc, fmalita, glenn, gtk-ews, gyuyoung.kim, jer.noble, kondapallykalyan, luiz, macpherson, menard, noam, pdr, philn, rego+ews, roger_fong, schenney, sergio, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 124325    
Attachments:
Description Flags
v1
none
v2
none
v3
none
v3 none

Description Brian Burg 2013-11-24 18:12:18 PST
Suggested by darin in review of: https://bugs.webkit.org/show_bug.cgi?id=124325
Comment 1 Brian Burg 2013-11-24 22:22:35 PST
Created attachment 217772 [details]
v1
Comment 2 EFL EWS Bot 2013-11-24 22:29:15 PST
Comment on attachment 217772 [details]
v1

Attachment 217772 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/35168398
Comment 3 EFL EWS Bot 2013-11-24 22:33:49 PST
Comment on attachment 217772 [details]
v1

Attachment 217772 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/35318405
Comment 4 Brian Burg 2013-11-24 22:36:47 PST
Created attachment 217773 [details]
v2
Comment 5 EFL EWS Bot 2013-11-24 22:41:23 PST
Comment on attachment 217773 [details]
v2

Attachment 217773 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/36148162
Comment 6 EFL EWS Bot 2013-11-24 22:43:17 PST
Comment on attachment 217773 [details]
v2

Attachment 217773 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/35188428
Comment 7 Brian Burg 2013-11-24 22:57:55 PST
Created attachment 217775 [details]
v3
Comment 8 EFL EWS Bot 2013-11-24 23:02:15 PST
Comment on attachment 217775 [details]
v3

Attachment 217775 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/35358389
Comment 9 EFL EWS Bot 2013-11-24 23:03:59 PST
Comment on attachment 217775 [details]
v3

Attachment 217775 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/35318411
Comment 10 kov's GTK+ EWS bot 2013-11-25 01:07:26 PST
Comment on attachment 217775 [details]
v3

Attachment 217775 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/35328394
Comment 11 Brian Burg 2013-11-25 07:21:11 PST
Created attachment 217805 [details]
v3
Comment 12 EFL EWS Bot 2013-11-25 07:40:18 PST
Comment on attachment 217805 [details]
v3

Attachment 217805 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/36468068
Comment 13 Sergio Correia (qrwteyrutiyoup) 2013-11-25 07:45:46 PST
Comment on attachment 217805 [details]
v3

View in context: https://bugs.webkit.org/attachment.cgi?id=217805&action=review

> Source/WebCore/platform/graphics/ImageBuffer.h:84
> +            std::unique_ptr<ImageBuffer> buffer(new ImageBuffer(size, resolutionScale, colorSpace, renderingMode, success));

It might be better to use std::make_unique here: 
auto buffer = std::make_unique<ImageBuffer>(size, resolutionScale, colorSpace, renderingMode, success);
Comment 14 Brian Burg 2013-11-25 08:05:05 PST
(In reply to comment #13)
> (From update of attachment 217805 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=217805&action=review
> 
> > Source/WebCore/platform/graphics/ImageBuffer.h:84
> > +            std::unique_ptr<ImageBuffer> buffer(new ImageBuffer(size, resolutionScale, colorSpace, renderingMode, success));
> 
> It might be better to use std::make_unique here: 
> auto buffer = std::make_unique<ImageBuffer>(size, resolutionScale, colorSpace, renderingMode, success);

Ah, true. Thanks for pointing it out.
Comment 15 Brian Burg 2013-11-25 08:07:03 PST
Not sure why WK2 EFL bot is hitting an ICE, or why the preflight test is crashy. :-/
Comment 16 Sergio Correia (qrwteyrutiyoup) 2013-11-25 08:13:54 PST
(In reply to comment #15)
> Not sure why WK2 EFL bot is hitting an ICE, or why the preflight test is crashy. :-/

By the looks of the error message, looks like it hit an OOM condition, which in general isn't related to the patch being tested. Just to make your life harder :)
Comment 17 Andreas Kling 2013-11-26 14:19:05 PST
Comment on attachment 217805 [details]
v3

r=me.
EFL EWS has been ICE'ing randomly for ages, nothing to do with your patch.
Comment 18 WebKit Commit Bot 2013-11-26 14:55:42 PST
Comment on attachment 217805 [details]
v3

Clearing flags on attachment: 217805

Committed r159791: <http://trac.webkit.org/changeset/159791>
Comment 19 WebKit Commit Bot 2013-11-26 14:55:46 PST
All reviewed patches have been landed.  Closing bug.