Bug 200009

Summary: Correct web audio-related crash in seed reports
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, jer.noble, pvollan
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Brent Fulgham 2019-07-22 12:36:01 PDT
We removed access to the Audio Processing Tap XPC service in our iOS 13 work because our testing did not show it being used in normal browsing tests. Unfortunately, it is used in some web audio cases (and games).

This patch makes two changes:

(1) It restores access to the "com.apple.coremedia.audioprocessingtap.xpc" XPC service.
(2) It checks the return value of MTAudioProcessingTapCreate (which fails when the service is blocked) and returns early to avoid using the invalid audio tap.
Comment 1 Brent Fulgham 2019-07-22 12:36:40 PDT
<rdar://problem/51565203>
Comment 2 Brent Fulgham 2019-07-22 13:03:43 PDT
Created attachment 374622 [details]
Patch
Comment 3 Brent Fulgham 2019-07-22 13:30:35 PDT
*** Bug 200012 has been marked as a duplicate of this bug. ***
Comment 4 Per Arne Vollan 2019-07-22 13:57:39 PDT
Comment on attachment 374622 [details]
Patch

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

R=me.

> Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:380
> +    (global-name "com.apple.coremedia.audioprocessingtap.xpc") ;; <rdar://problem/51565203>

I think the explicit allow in not needed, since it is already allowed in the imported sandbox file.

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:609
> +       (global-name "com.apple.coremedia.audioprocessingtap.xpc") ;; <rdar://problem/51565203>

Is this needed on macOS?
Comment 5 Brent Fulgham 2019-07-22 14:18:48 PDT
Created attachment 374631 [details]
Patch for landing
Comment 6 Brent Fulgham 2019-07-22 14:20:45 PDT
Created attachment 374632 [details]
Patch for landing
Comment 7 Alexey Proskuryakov 2019-07-22 14:25:44 PDT
*** Bug 200012 has been marked as a duplicate of this bug. ***
Comment 8 WebKit Commit Bot 2019-07-22 15:03:04 PDT
Comment on attachment 374632 [details]
Patch for landing

Clearing flags on attachment: 374632

Committed r247701: <https://trac.webkit.org/changeset/247701>
Comment 9 WebKit Commit Bot 2019-07-22 15:03:06 PDT
All reviewed patches have been landed.  Closing bug.