Bug 184373 - MediaSessionManageriOS should defer creation of MPVolumeView until it needs to monitor AirPlay routes
Summary: MediaSessionManageriOS should defer creation of MPVolumeView until it needs t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-06 16:21 PDT by Jeremy Jones
Modified: 2018-05-23 23:20 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.15 KB, patch)
2018-04-06 16:30 PDT, Jeremy Jones
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (9.91 KB, patch)
2018-04-09 10:04 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2018-04-06 16:21:01 PDT
MediaSessionManageriOS should defer creation of MPVolumeView until it needs to monitor AirPlay routes
Comment 1 Jeremy Jones 2018-04-06 16:29:15 PDT
rdar://problem/35177606
Comment 2 Jeremy Jones 2018-04-06 16:30:12 PDT
Created attachment 337402 [details]
Patch
Comment 3 Eric Carlson 2018-04-06 19:56:59 PDT
Comment on attachment 337402 [details]
Patch

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

> Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:429
> +                    BEGIN_BLOCK_OBJC_EXCEPTIONS
> +                    [routingController setDiscoveryMode:MPRouteDiscoveryModeDisabled];
> +                    volumeView.clear();
> +                    routingController.clear();
> +                    END_BLOCK_OBJC_EXCEPTIONS

This is the same as the block in -dealloc, can they be shared?
Comment 4 Jeremy Jones 2018-04-09 09:44:41 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 337402 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=337402&action=review
> 
> > Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:429
> > +                    BEGIN_BLOCK_OBJC_EXCEPTIONS
> > +                    [routingController setDiscoveryMode:MPRouteDiscoveryModeDisabled];
> > +                    volumeView.clear();
> > +                    routingController.clear();
> > +                    END_BLOCK_OBJC_EXCEPTIONS
> 
> This is the same as the block in -dealloc, can they be shared?

I can actually share it in three places.
Comment 5 Jeremy Jones 2018-04-09 10:04:56 PDT
Created attachment 337506 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2018-04-10 13:31:07 PDT
Comment on attachment 337506 [details]
Patch for landing

Clearing flags on attachment: 337506

Committed r230490: <https://trac.webkit.org/changeset/230490>