Bug 59725

Summary: -[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:] leaks a CALayer
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, jer.noble, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch mitz: review+

Description David Kilzer (:ddkilzer) 2011-04-28 12:21:00 PDT
Created attachment 91536 [details]
Patch

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]
Patch

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]
Patch

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)