Bug 231034 - GPU Process microphone attribution SPI adoption
Summary: GPU Process microphone attribution SPI adoption
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-30 12:27 PDT by Kate Cheney
Modified: 2021-10-04 08:04 PDT (History)
12 users (show)

See Also:


Attachments
Patch (8.94 KB, patch)
2021-09-30 12:31 PDT, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (10.13 KB, patch)
2021-09-30 12:51 PDT, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (10.19 KB, patch)
2021-09-30 12:54 PDT, Kate Cheney
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (10.27 KB, patch)
2021-09-30 13:04 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (10.30 KB, patch)
2021-09-30 13:22 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Build fix (1.51 KB, patch)
2021-10-03 13:58 PDT, David Kilzer (:ddkilzer)
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2021-09-30 12:27:51 PDT
GPU Process microphone attribution SPI adoption
Comment 1 Radar WebKit Bug Importer 2021-09-30 12:28:11 PDT
<rdar://problem/83732537>
Comment 2 Kate Cheney 2021-09-30 12:31:45 PDT
Created attachment 439769 [details]
Patch
Comment 3 Kate Cheney 2021-09-30 12:51:49 PDT
Created attachment 439772 [details]
Patch
Comment 4 Kate Cheney 2021-09-30 12:54:49 PDT
Created attachment 439773 [details]
Patch
Comment 5 Kate Cheney 2021-09-30 13:04:35 PDT
Created attachment 439775 [details]
Patch
Comment 6 youenn fablet 2021-09-30 13:06:35 PDT
Comment on attachment 439775 [details]
Patch

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

> Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:455
> +            gpuProcess().audioSessionManager().addProxy(*m_audioSessionProxy, *auditToken);

We probably want to call addProxy even if there is no auditToken, how about passing a std::optional to addProxy?
Comment 7 Kate Cheney 2021-09-30 13:07:20 PDT
(In reply to youenn fablet from comment #6)
> Comment on attachment 439775 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=439775&action=review
> 
> > Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:455
> > +            gpuProcess().audioSessionManager().addProxy(*m_audioSessionProxy, *auditToken);
> 
> We probably want to call addProxy even if there is no auditToken, how about
> passing a std::optional to addProxy?

I thought about that. When will there be a case with no audit token?
Comment 8 Kate Cheney 2021-09-30 13:22:03 PDT
Created attachment 439777 [details]
Patch
Comment 9 Kate Cheney 2021-10-01 10:39:33 PDT
failing mac-wk1 test is media related, but when I ran it locally I found that it failed with and without the patch. Letting EWS run once more but it seems unlikely that it is caused by the patch.
Comment 10 EWS 2021-10-01 13:32:50 PDT
Committed r283394 (242398@main): <https://commits.webkit.org/242398@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439777 [details].
Comment 11 Chris Dumez 2021-10-02 09:43:14 PDT
Seems to have broken the Open Source iOS build:
/Volumes/Data/worker/ios-simulator-15-release/build/Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:150:53: error: instance method '-setHostProcessAttribution:error:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
    [[PAL::getAVAudioSessionClass() sharedInstance] setHostProcessAttribution:@[ bundleProxy.bundleIdentifier ] error:&error];
Comment 12 Chris Dumez 2021-10-02 09:43:47 PDT
(In reply to Chris Dumez from comment #11)
> Seems to have broken the Open Source iOS build:
> /Volumes/Data/worker/ios-simulator-15-release/build/Source/WebCore/platform/
> audio/ios/AudioSessionIOS.mm:150:53: error: instance method
> '-setHostProcessAttribution:error:' not found (return type defaults to 'id')
> [-Werror,-Wobjc-method-access]
>     [[PAL::getAVAudioSessionClass() sharedInstance]
> setHostProcessAttribution:@[ bundleProxy.bundleIdentifier ] error:&error];

https://build.webkit.org/#/builders/273/builds/95
Comment 13 Kate Cheney 2021-10-02 19:15:40 PDT
(In reply to Chris Dumez from comment #12)
> (In reply to Chris Dumez from comment #11)
> > Seems to have broken the Open Source iOS build:
> > /Volumes/Data/worker/ios-simulator-15-release/build/Source/WebCore/platform/
> > audio/ios/AudioSessionIOS.mm:150:53: error: instance method
> > '-setHostProcessAttribution:error:' not found (return type defaults to 'id')
> > [-Werror,-Wobjc-method-access]
> >     [[PAL::getAVAudioSessionClass() sharedInstance]
> > setHostProcessAttribution:@[ bundleProxy.bundleIdentifier ] error:&error];
> 
> https://build.webkit.org/#/builders/273/builds/95

I guess I could do something like:

#if !USE(APPLE_INTERNAL_SDK)
@interface AVAudioSession (Staging_80304064)
- (BOOL)setHostProcessAttribution:(NSString *)bundleID error:(NSError **)outError;
@end
#endif

Although I am not sure that is the right solution, maybe the bot just needs updating.
Comment 14 David Kilzer (:ddkilzer) 2021-10-03 13:58:00 PDT
Reopening to attach new patch.
Comment 15 David Kilzer (:ddkilzer) 2021-10-03 13:58:02 PDT
Created attachment 440015 [details]
Build fix
Comment 16 David Kilzer (:ddkilzer) 2021-10-03 14:07:30 PDT
Comment on attachment 440015 [details]
Build fix

Waiting for ios-sim, ios-wk2, api-ios to go green.

Note: api-ios test may fail due to Bug 230406, but I'm looking at that now.
Comment 17 David Kilzer (:ddkilzer) 2021-10-03 14:25:23 PDT
Comment on attachment 440015 [details]
Build fix

iOS build has gotten past the failure from the dashboard, so marking cq+.
Comment 18 EWS 2021-10-03 14:26:39 PDT
/Volumes/Data/worker/Commit-Queue/build/Source/WebCore/PAL/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Comment 19 David Kilzer (:ddkilzer) 2021-10-03 14:30:09 PDT
(In reply to EWS from comment #10)
> Committed r283394 (242398@main): <https://commits.webkit.org/242398@main>
> 
> All reviewed patches have been landed. Closing bug and clearing flags on
> attachment 439777 [details].

Landed build fix manually:

Committed r283480:  <https://trac.webkit.org/r283480>
Comment 20 Kate Cheney 2021-10-04 08:04:49 PDT
Thanks for fixing!