[PartitionAlloc] Don't use a "static local" for ThreadCacheRegistry.
ThreadCacheRegistry is a singleton, using the common static local pattern. However this doesn't work for PartitionAlloc-Everywhere builds on Windows, as static locals are not safe very early on, and this one is called during CRT initialization. To avoid using a static local here, use a regular global variable in the .cc. This means that the object must be constexpr-constructible, so this CL: - Moves to PartitionLock vs base::Lock - Makes PartitionLock's constructor constexpr Bug: 998048 Change-Id: Ie16c642122696d34d9f07813a763ca986b25895c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2474857 Commit-Queue: Benoit L <lizeb@chromium.org> Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Reviewed-by:
Bartek Nowierski <bartekn@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#817661}
Showing
Please register or sign in to comment