Guard use of Chrome TLS in GlobalActivityTracker::GetOrCreateTracker.

The implementation of heap_profiling uses base::Lock. That uses
GlobalActivityTracker::GetOrCreateTracker, which uses Chrome TLS. Since
heap_profiling may be used post TLS destruction, all called code must also guard
against use of Chrome TLS by checking
base::ThreadLocalStorage::HasBeenDestroyed.

Bug: 864589
Change-Id: I9b7b61d702a79062f847f17d18b6d30f3681b837
Reviewed-on: https://chromium-review.googlesource.com/1142347
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576224}

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