Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: base/threading/thread_local_storage.cc

Issue 880023002: Fix variable shadowing in TLS code on VS2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2015-histogram-2
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/thread_local_storage.cc
diff --git a/base/threading/thread_local_storage.cc b/base/threading/thread_local_storage.cc
index 4f4169fe71815f909beac197f09cecbf3185589f..54928ede272526bc4ac24bc4621facecfc9b9eee 100644
--- a/base/threading/thread_local_storage.cc
+++ b/base/threading/thread_local_storage.cc
@@ -140,8 +140,8 @@ void OnThreadExitInternal(void* value) {
base::subtle::Atomic32 last_used_tls_key =
base::subtle::NoBarrier_Load(&g_last_used_tls_key);
for (int slot = last_used_tls_key; slot > 0; --slot) {
- void* value = stack_allocated_tls_data[slot];
- if (value == NULL)
+ void* tls_value = stack_allocated_tls_data[slot];
+ if (tls_value == NULL)
continue;
base::ThreadLocalStorage::TLSDestructorFunc destructor =
@@ -149,7 +149,7 @@ void OnThreadExitInternal(void* value) {
if (destructor == NULL)
continue;
stack_allocated_tls_data[slot] = NULL; // pre-clear the slot.
- destructor(value);
+ destructor(tls_value);
// Any destructor might have called a different service, which then set
// a different slot to a non-NULL value. Hence we need to check
// the whole vector again. This is a pthread standard.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698