diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 01:47:24 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 01:47:24 +0000 |
commit | f0cc545cfe6f691c16399c27cb5994c158e439f6 (patch) | |
tree | f46f2e50f584b8fe9b3b758ff983ecf4f1db52aa /base/thread_local_storage_win.cc | |
parent | ebc4e18bbeb1fc4a4777ca2ac416ba9295df105c (diff) | |
download | chromium_src-f0cc545cfe6f691c16399c27cb5994c158e439f6.zip chromium_src-f0cc545cfe6f691c16399c27cb5994c158e439f6.tar.gz chromium_src-f0cc545cfe6f691c16399c27cb5994c158e439f6.tar.bz2 |
Don't get the TLS for invalid TLS indexes. This
is making App Verifier complain. This case
happens early when the process starts.
Review URL: http://codereview.chromium.org/11207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5592 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/thread_local_storage_win.cc')
-rw-r--r-- | base/thread_local_storage_win.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/thread_local_storage_win.cc b/base/thread_local_storage_win.cc index 2a5e57c..62ec6ea 100644 --- a/base/thread_local_storage_win.cc +++ b/base/thread_local_storage_win.cc @@ -100,6 +100,9 @@ void ThreadLocalStorage::Slot::Set(void* value) { } void ThreadLocalStorage::ThreadExit() { + if (tls_key_ == TLS_OUT_OF_INDEXES) + return; + void** tls_data = static_cast<void**>(TlsGetValue(tls_key_)); // Maybe we have never initialized TLS for this thread. |