Bug 184373

Summary: MediaSessionManageriOS should defer creation of MPVolumeView until it needs to monitor AirPlay routes
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: MediaAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, fred.wang, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch for landing none

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>