Skip to content

Commit

Permalink
Make the lazy TLS pointer to UtilityThread into a LeakyLazyInstance.
Browse files Browse the repository at this point in the history
Try to fix a NULL dereference which is likely caused by the utility thread
living past AtExit.

BUG=272753
R=joi@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23448010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220043 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
earthdok@chromium.org committed Aug 28, 2013
1 parent 7b896ef commit d67f4ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/public/utility/utility_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace content {

// Keep the global UtilityThread in a TLS slot so it is impossible to access
// incorrectly from the wrong thread.
static base::LazyInstance<base::ThreadLocalPointer<UtilityThread> > lazy_tls =
LAZY_INSTANCE_INITIALIZER;
static base::LazyInstance<base::ThreadLocalPointer<UtilityThread> >::Leaky
lazy_tls = LAZY_INSTANCE_INITIALIZER;

UtilityThread* UtilityThread::Get() {
return lazy_tls.Pointer()->Get();
Expand Down

0 comments on commit d67f4ff

Please sign in to comment.