Bug 211960 - Reorder entitlement check in WebKit::applicationType()
Summary: Reorder entitlement check in WebKit::applicationType()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-15 09:12 PDT by David Quesada
Modified: 2020-05-15 09:12 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Quesada 2020-05-15 09:12:04 PDT
The operands in the expression `WTF::processHasEntitlement("com.apple.UIKit.vends-view-services") && window._isHostedInAnotherProcess` could be swapped to avoid the entitlement check by short-circuit evaluation. Loading and parsing the app’s entitlements can be non-trivial (at least compared to the -_isHostedInAnotherProcess method call), and most web views aren’t added to windows in view services, so the entitlement check is often unneeded.