| Summary: | Reorder entitlement check in WebKit::applicationType() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Quesada <david_quesada> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
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.