Bug 222582 - REGRESSION(r270691): It's impossible to use MobileAsset fonts on macOS
Summary: REGRESSION(r270691): It's impossible to use MobileAsset fonts on macOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-01 17:43 PST by Myles C. Maxfield
Modified: 2021-03-02 19:05 PST (History)
7 users (show)

See Also:


Attachments
WIP (20.62 KB, patch)
2021-03-01 17:45 PST, Myles C. Maxfield
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
WIP (21.39 KB, patch)
2021-03-01 18:30 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (17.58 KB, patch)
2021-03-01 22:37 PST, Myles C. Maxfield
pvollan: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for committing (20.69 KB, patch)
2021-03-02 15:17 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].