Bug 131878 - Fix AVPlayerController leak on pages with video
Summary: Fix AVPlayerController leak on pages with video
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2014-04-18 21:00 PDT by Joseph Pecoraro
Modified: 2014-04-19 15:13 PDT (History)
7 users (show)

See Also:

[PATCH] Proposed Fix (1.36 KB, patch)
2014-04-18 21:02 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-04-18 21:00:50 PDT
I was seeing leaks of an AVPlayerController allocated with this stack:

        | WebKit::WebContext::createWebPage(WebKit::PageClient&, WebKit::WebPageConfiguration)
        | WebKit::WebProcessProxy::createWebPage(WebKit::PageClient&, WebKit::WebPageConfiguration const&)
        | WebKit::WebPageProxy::create(WebKit::PageClient&, WebKit::WebProcessProxy&, unsigned long long, WebKit::WebPageConfiguration const&)
        | WebKit::WebPageProxy::WebPageProxy(WebKit::PageClient&, WebKit::WebProcessProxy&, unsigned long long, WebKit::WebPageConfiguration const&)
        | WebKit::WebVideoFullscreenManagerProxy::create(WebKit::WebPageProxy&)
        | WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy(WebKit::WebPageProxy&)
        | WebCore::WebVideoFullscreenInterfaceAVKit::setWebVideoFullscreenModel(WebCore::WebVideoFullscreenModel*)
        | -[WebAVPlayerController init]
        | _objc_rootAlloc
        | class_createInstance
        | calloc
        | malloc_zone_calloc 

The allocation was:

    self.playerControllerProxy = [[classAVPlayerController alloc] init];

This is a (retain) property which will +1 the incoming object, so the alloc/init needs to be balanced.
Comment 1 Joseph Pecoraro 2014-04-18 21:02:47 PDT
Created attachment 229711 [details]
[PATCH] Proposed Fix
Comment 2 WebKit Commit Bot 2014-04-19 15:13:08 PDT
Comment on attachment 229711 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 229711

Committed r167551: <http://trac.webkit.org/changeset/167551>
Comment 3 WebKit Commit Bot 2014-04-19 15:13:13 PDT
All reviewed patches have been landed.  Closing bug.