Bug 147398 - Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
Summary: Avoid unnecessarily constructing PlatformMediaSessionManager on Document dest...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-28 21:18 PDT by Chris Dumez
Modified: 2015-07-29 00:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.43 KB, patch)
2015-07-28 21:24 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-07-28 21:18:56 PDT
When looking at a benchmark trace, I saw the following:
54,16.2%,15.5%,WebCore::HTMLDocument::~HTMLDocument() (in WebCore)
54,16.2%,15.5%,    WebCore::Document::~Document() (in WebCore)
54,16.2%,15.5%,        WebCore::PlatformMediaSessionManager::sharedManager() (in WebCore)
54,16.2%,15.5%,            WebCore::MediaSessionManageriOS::MediaSessionManageriOS() (in WebCore)
54,16.2%,15.5%,                -[WebMediaSessionHelper initWithCallback:] (in WebCore)
54,16.2%,15.5%,                    -[WebMediaSessionHelper allocateVolumeView] (in WebCore)
50,15.0%,14.4%,                        -[MPVolumeView initWithFrame:style:] (in MediaPlayer)
4,1.2%,1.2%,                        initMPVolumeView() (in WebCore)

We end up constructing a PlatformMediaSessionManager when destroying a Document, because of a call to PlatformMediaSessionManager::shared().stopAllMediaPlaybackForProcess(). This seems unfortunate.
Comment 1 Chris Dumez 2015-07-28 21:24:02 PDT
Created attachment 257730 [details]
Patch
Comment 2 WebKit Commit Bot 2015-07-29 00:18:03 PDT
Comment on attachment 257730 [details]
Patch

Clearing flags on attachment: 257730

Committed r187544: <http://trac.webkit.org/changeset/187544>
Comment 3 WebKit Commit Bot 2015-07-29 00:18:09 PDT
All reviewed patches have been landed.  Closing bug.