Bug 44959 - [GTK] Leak in the GraphicsContextCairo drawPathShadow
Summary: [GTK] Leak in the GraphicsContextCairo drawPathShadow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 09:12 PDT by Alejandro G. Castro
Modified: 2010-09-13 11:46 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (1.67 KB, patch)
2010-08-31 09:15 PDT, Alejandro G. Castro
no flags Details | Formatted Diff | Diff
Proposed patch (3.03 KB, patch)
2010-09-01 04:33 PDT, Alejandro G. Castro
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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