Bug 237933 - Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
Summary: Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager l...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-15 16:55 PDT by Chris Dumez
Modified: 2022-03-18 14:55 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.34 KB, patch)
2022-03-15 17:05 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-03-15 16:55:39 PDT
Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled] for performance reason since those APIs are synchronous. Instead, rely on the locationManagerDidChangeAuthorization delegate function to get the authorization asynchronously.
Comment 1 Chris Dumez 2022-03-15 16:55:50 PDT
<rdar://89931043>
Comment 2 Chris Dumez 2022-03-15 17:05:02 PDT
Created attachment 454778 [details]
Patch
Comment 3 Chris Dumez 2022-03-17 07:40:42 PDT
Patch is ready for review. The EWS failure is unrelated.
Comment 4 Geoffrey Garen 2022-03-18 11:58:20 PDT
Comment on attachment 454778 [details]
Patch

r=me

Looks like a nice simplification too.
Comment 5 Chris Dumez 2022-03-18 11:58:44 PDT
Comment on attachment 454778 [details]
Patch

Thanks for reviewing.
Comment 6 EWS 2022-03-18 14:54:59 PDT
Committed r291496 (248608@main): <https://commits.webkit.org/248608@main>

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