Bug 107112 - [Gtk] [Cairo] Memory leak when is WebView destroy.
Summary: [Gtk] [Cairo] Memory leak when is WebView destroy.
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Normal
Assignee: Nobody
Keywords: Cairo, Gtk
Depends on:
Reported: 2013-01-17 03:53 PST by Oleg Smirnov
Modified: 2013-01-21 05:35 PST (History)
4 users (show)

See Also:

Patch (1.95 KB, patch)
2013-01-17 04:45 PST, Oleg Smirnov
no flags Details | Formatted Diff | Diff
Patch (1.93 KB, patch)
2013-01-17 23:19 PST, Oleg Smirnov
no flags Details | Formatted Diff | Diff
Patch (1.92 KB, patch)
2013-01-19 12:26 PST, Oleg Smirnov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Smirnov 2013-01-17 03:53:00 PST
Steps to reproduce:
1) Create one WebkitWebView, screen resolution 1280*720
2) Load any page
3) desrtoy WebkitWebView
4) Repeat steps 1-3 several times.

Actual Results: Memory will be increase on ~7 mb after destroying.
Expected Results: No memory growing here.

Build Date & Platform: Build 2013-01-17 on Ubuntu 12.04.
Comment 1 Oleg Smirnov 2013-01-17 04:45:21 PST
Created attachment 183165 [details]
Comment 2 WebKit Review Bot 2013-01-17 04:49:26 PST
Attachment 183165 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp:38:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Oleg Smirnov 2013-01-17 23:19:05 PST
Created attachment 183386 [details]
Comment 4 Philippe Normand 2013-01-18 08:15:35 PST
Comment on attachment 183386 [details]

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

> Source/WebCore/ChangeLog:11
> +        No new tests, there is platform memory leak.
> +
> +        Created cairo surface never then deleted, cause of factory method
> +        createSurfaceForBackingStore for GTK backend returns incorrect refered PassRefPtr value.

"No new test" usually goes after the change description, which could use some rewording, I think. Something like "Make createSurfaceForBackingStore return a smart pointer in all supported build configurations to avoid a memory leak"
Comment 5 Oleg Smirnov 2013-01-19 12:26:32 PST
Created attachment 183630 [details]
Comment 6 Martin Robinson 2013-01-19 16:04:46 PST
Comment on attachment 183630 [details]

Comment 7 WebKit Review Bot 2013-01-21 05:35:39 PST
Comment on attachment 183630 [details]

Clearing flags on attachment: 183630

Committed r140325: <http://trac.webkit.org/changeset/140325>
Comment 8 WebKit Review Bot 2013-01-21 05:35:42 PST
All reviewed patches have been landed.  Closing bug.