Bug 211054 - Warn when NeverDestroyed<Lock> is used
Summary: Warn when NeverDestroyed<Lock> is used
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
Keywords: InRadar
Depends on:
Reported: 2020-04-26 14:07 PDT by Yusuke Suzuki
Modified: 2020-04-26 16:05 PDT (History)
6 users (show)

See Also:

Patch (6.67 KB, patch)
2020-04-26 14:54 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2020-04-26 14:07:05 PDT
Lock is designed to be constant-initialized. Just use `static Lock`, instead of `static NeverDestroyed<Lock>`.
`static Lock` is cleaner, efficient, and further it fixes the potential race issue which `NeverDestroyed<Lock>` has.
Comment 1 Yusuke Suzuki 2020-04-26 14:54:26 PDT
Created attachment 397631 [details]
Comment 2 Yusuke Suzuki 2020-04-26 15:46:40 PDT
Comment on attachment 397631 [details]

EWS webkitpy is green.
Comment 3 EWS 2020-04-26 16:04:25 PDT
Committed r260734: <https://trac.webkit.org/changeset/260734>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397631 [details].
Comment 4 Radar WebKit Bug Importer 2020-04-26 16:05:13 PDT