Bug 44959

Summary: [GTK] Leak in the GraphicsContextCairo drawPathShadow
Product: WebKit Reporter: Alejandro G. Castro <alex>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Proposed patch
none
Proposed patch mrobinson: review+

Description Alejandro G. Castro 2010-08-31 09:12:44 PDT
We are copying the cairo_path but we are not destroying it:

    cairo_path_t* path = cairo_copy_path(cr);
Comment 1 Alejandro G. Castro 2010-08-31 09:15:20 PDT
Created attachment 66062 [details]
Proposed patch
Comment 2 Gustavo Noronha (kov) 2010-08-31 11:44:10 PDT
Comment on attachment 66062 [details]
Proposed patch

Can't we use a PlatformRefPtr/CairoRefPtr for this?
Comment 3 Alejandro G. Castro 2010-08-31 13:28:49 PDT
(In reply to comment #2)
> (From update of attachment 66062 [details])
> Can't we use a PlatformRefPtr/CairoRefPtr for this?

I've checked path is not already included, but I can do it in this same patch and use it, thanks for the comment.
Comment 4 Alejandro G. Castro 2010-09-01 04:33:50 PDT
Created attachment 66198 [details]
Proposed patch

Added the GOwnPtrCairo code so we can use it in these situations.
Comment 5 WebKit Review Bot 2010-09-01 04:40:46 PDT
Attachment 66198 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/graphics/cairo/GOwnPtrCairo.h:31:  cairo_path_t is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Alejandro G. Castro 2010-09-01 04:54:13 PDT
(In reply to comment #5)
> Attachment 66198 [details] did not pass style-queue:
> 
> Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
> WebCore/platform/graphics/cairo/GOwnPtrCairo.h:31:  cairo_path_t is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
> Total errors found: 1 in 4 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

Yep, it is a false positive. Opened bug 45032.
Comment 7 Martin Robinson 2010-09-01 22:33:34 PDT
Comment on attachment 66198 [details]
Proposed patch

Looks reasonable.
Comment 8 Alejandro G. Castro 2010-09-13 11:46:44 PDT
lande r67398