Bug 237933

Summary: Avoid calls to [CLLocationManager authorizationStatus] & [CLLocationManager locationServicesEnabled]
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, ggaren, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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].