Fix a race in ThreadLocalStorage::StaticSlot::initialized which triggers a TSAN error.

Also fix a data race with ThreadData::status_. TSan doesn't see this race explicitly, but it contributes to a race with the use of StaticSlot in ThreadData::tls_index_.

BUG=268941
TESTED=Ran base_unittests.
TSAN errors before: lots, oodles, slathers, acres
After: Zip, zilch, nadda

Review URL: https://codereview.chromium.org/1222123002

Cr-Commit-Position: refs/heads/master@{#339219}


CrOS-Libchrome-Original-Commit: 42d16882080508876676ef164c1f7a863ca1fbf3
4 files changed
tree: c7d9393e96846d1cd4434ea11b45fb5ecefd4f36
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/