RESOLVED FIXED38899
[CAIRO] Memory leak with cairo_pattern_t objects
https://bugs.webkit.org/show_bug.cgi?id=38899
Summary [CAIRO] Memory leak with cairo_pattern_t objects
Andrei Bucur
Reported 2010-05-11 05:37:20 PDT
There is an incomplete life cycle for cairo_pattern_t objects returned by the call Pattern::createPlatformPattern in PatternCairo.cpp. The returned object is applied directly on the current surface without being deleted after the paint operation was executed. This flaw can generate huge memory leaks if the pattern contains large objects (such as images). This patch completes the life cycle of the problematic objects by calling cairo_destroy_pattern on them after the paint operation.
Attachments
First patch (4.74 KB, patch)
2010-05-11 05:45 PDT, Andrei Bucur
no flags
Second patch (4.56 KB, patch)
2010-05-11 06:02 PDT, Andrei Bucur
no flags
Andrei Bucur
Comment 1 2010-05-11 05:45:39 PDT
Created attachment 55691 [details] First patch Repost the patch because the first attempt failed.
WebKit Review Bot
Comment 2 2010-05-11 05:51:25 PDT
Attachment 55691 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 WebCore/ChangeLog:6: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:7: Line contains tab character. [whitespace/tab] [5] WebCore/ChangeLog:10: Line contains tab character. [whitespace/tab] [5] Total errors found: 3 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andrei Bucur
Comment 3 2010-05-11 06:02:01 PDT
Created attachment 55693 [details] Second patch Same patch, no tabs this time.
Gustavo Noronha (kov)
Comment 4 2010-05-11 07:31:36 PDT
Comment on attachment 55693 [details] Second patch Makes sense to me! Thanks!
WebKit Commit Bot
Comment 5 2010-05-15 12:42:01 PDT
Comment on attachment 55693 [details] Second patch Clearing flags on attachment: 55693 Committed r59548: <http://trac.webkit.org/changeset/59548>
WebKit Commit Bot
Comment 6 2010-05-15 12:42:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.