Bug 188820

Summary: Remove extern variable and simplify state initialization in TextCheckerMac.mm
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebKit Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: macOS 10.13   
Attachments:
Description Flags
Patch none

Daniel Bates
Reported 2018-08-21 15:07:55 PDT
Currently TextCheckerMac.mm stores the TextCheckerState object in a file-local variables that has external linkage. This is unnecessary. Moreover we need to do a dance with other static variables to initialize this external variable exactly once per process. We should use a static file-local, non-member function and NeverDestroyed to simplify this code.
Attachments
Patch (13.66 KB, patch)
2018-08-21 15:12 PDT, Daniel Bates
no flags
Daniel Bates
Comment 1 2018-08-21 15:12:02 PDT
Daniel Bates
Comment 2 2018-08-27 10:09:25 PDT
Comment on attachment 347707 [details] Patch Clearing flags on attachment: 347707 Committed r235379: <https://trac.webkit.org/changeset/235379>
Daniel Bates
Comment 3 2018-08-27 10:09:27 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 4 2018-08-27 10:10:17 PDT
Note You need to log in before you can comment on or make changes to this bug.