Bug 222582

Summary: REGRESSION(r270691): It's impossible to use MobileAsset fonts on macOS
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, dino, jonlee, pvollan, simon.fraser, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP
ews-feeder: commit-queue-
WIP
none
Patch
pvollan: review+, ews-feeder: commit-queue-
Patch for committing none

Description Myles C. Maxfield 2021-03-01 17:43:40 PST
REGRESSION(r270691): It's impossible to use MobileAsset fonts on macOS
Comment 1 Myles C. Maxfield 2021-03-01 17:45:39 PST
Created attachment 421893 [details]
WIP
Comment 2 Myles C. Maxfield 2021-03-01 17:45:41 PST
<rdar://problem/74877450>
Comment 3 Myles C. Maxfield 2021-03-01 18:30:23 PST
Created attachment 421895 [details]
WIP
Comment 4 Myles C. Maxfield 2021-03-01 22:37:33 PST
Created attachment 421905 [details]
Patch
Comment 5 Per Arne Vollan 2021-03-02 05:27:27 PST
Comment on attachment 421905 [details]
Patch

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

Thanks! R=me.

> Source/WebKit/UIProcess/WebPageProxy.cpp:10413
> +    SandboxExtension::createHandleForMachLookup("com.apple.mobileassetd.v2"_s, WTF::nullopt, mobileAssetHandleV2);

Perhaps a new HAVE define could be added to protect this?

> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:1103
> +        "com.apple.mobileassetd.v2"

Is adding this needed when __MAC_OS_X_VERSION_MIN_REQUIRED <= 110000? We should do our best to avoid adding access to new services, also for older OSes.
Comment 6 Per Arne Vollan 2021-03-02 09:09:47 PST
Comment on attachment 421905 [details]
Patch

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

>> Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:1103
>> +        "com.apple.mobileassetd.v2"
> 
> Is adding this needed when __MAC_OS_X_VERSION_MIN_REQUIRED <= 110000? We should do our best to avoid adding access to new services, also for older OSes.

Perhaps you could avoid this by having the extension rule below be present for older OSes as well? Then access to this service could be granted through the SPI.
Comment 7 Myles C. Maxfield 2021-03-02 15:17:07 PST
Created attachment 422002 [details]
Patch for committing
Comment 8 EWS 2021-03-02 19:05:48 PST
Committed r273784: <https://commits.webkit.org/r273784>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422002 [details].