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}
3 files changed