[PartitionAlloc] Don't use static local variables.
On Windows, static local initialization calls into the runtime (more specifically, _Init_thread_header()), which then causes issues (see linked bug for details). To sidestep that, don't use local static variables to initialize the allocator, but write equivalent code "by hand". As the code is expected to perform as well as the current one, use it everywhere. Note that this is only done for the regular allocator, not the aligned one. If required, we can extend it to this one as well. This CL emulates `static base::NoDestructor<base::ThreadSafePartitionRoot>` by hand. Bug: 1126432 Change-Id: I2d019919befb4b4155bc61645da5f0efa5d4d2f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401024Reviewed-by:Will Harris <wfh@chromium.org> Reviewed-by:
Bartek Nowierski <bartekn@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Reviewed-by:
Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Benoit L <lizeb@chromium.org> Cr-Commit-Position: refs/heads/master@{#805648}
Showing
Please register or sign in to comment