Bug 59725 - -[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:] leaks a CALayer
Summary: -[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:] leaks a C...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Depends on:
Reported: 2011-04-28 12:21 PDT by David Kilzer (:ddkilzer)
Modified: 2011-04-28 15:53 PDT (History)
5 users (show)

See Also:

Patch (1.42 KB, patch)
2011-04-28 12:21 PDT, David Kilzer (:ddkilzer)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-04-28 12:21:00 PDT
Created attachment 91536 [details]

Reviewed by NOBODY (OOPS!).

* WebView/WebFullScreenController.mm:
(-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
Release the CALayer.
 2 files changed, 11 insertions(+), 0 deletions(-)
Comment 1 WebKit Review Bot 2011-04-28 12:25:22 PDT
Attachment 91536 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/mac/ChangeLog', u'Source/Web..." exit_code: 1

Source/WebKit/mac/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 Jer Noble 2011-04-28 12:34:15 PDT
Comment on attachment 91536 [details]

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

> Source/WebKit/mac/WebView/WebFullScreenController.mm:816
> +    [contentLayer release];

Whoops.  A leaked CALayer indeed.  Looks good to me.
Comment 3 mitz 2011-04-28 12:42:10 PDT
Comment on attachment 91536 [details]

Okay, but why not use RetainPtr?
Comment 4 David Kilzer (:ddkilzer) 2011-04-28 13:03:06 PDT
(In reply to comment #3)
> (From update of attachment 91536 [details])
> Okay, but why not use RetainPtr?

It wasn't used in the file yet, and I was making the minimal change necessary to fix the bug.

I'll switch to RetainPtr<> for the CALayer.
Comment 5 David Kilzer (:ddkilzer) 2011-04-28 15:33:49 PDT
Committed r85248: <http://trac.webkit.org/changeset/85248>
Comment 6 WebKit Review Bot 2011-04-28 15:53:08 PDT
http://trac.webkit.org/changeset/85248 might have broken WinCE Release (Build)