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

Side by Side Diff: base/tracked_objects.cc

Issue 8430002: Revert 107940 - Remove DCHECK that tickles TLS during shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/tracked_objects.h" 5 #include "base/tracked_objects.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 // static 202 // static
203 void ThreadData::OnThreadTermination(void* thread_data) { 203 void ThreadData::OnThreadTermination(void* thread_data) {
204 if (!kTrackAllTaskObjects) 204 if (!kTrackAllTaskObjects)
205 return; // Not compiled in. 205 return; // Not compiled in.
206 DCHECK(tls_index_.initialized()); 206 DCHECK(tls_index_.initialized());
207 if (!thread_data) 207 if (!thread_data)
208 return; 208 return;
209 reinterpret_cast<ThreadData*>(thread_data)->OnThreadTerminationCleanup(); 209 reinterpret_cast<ThreadData*>(thread_data)->OnThreadTerminationCleanup();
210 DCHECK_EQ(tls_index_.Get(), reinterpret_cast<ThreadData*>(NULL));
210 } 211 }
211 212
212 void ThreadData::OnThreadTerminationCleanup() const { 213 void ThreadData::OnThreadTerminationCleanup() const {
213 if (!is_a_worker_thread_) 214 if (!is_a_worker_thread_)
214 return; 215 return;
215 base::AutoLock lock(*list_lock_); 216 base::AutoLock lock(*list_lock_);
216 unregistered_thread_data_pool_->push(this); 217 unregistered_thread_data_pool_->push(this);
217 } 218 }
218 219
219 // static 220 // static
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 (combined_selectors_ & BIRTH_THREAD) ? "*" : 1137 (combined_selectors_ & BIRTH_THREAD) ? "*" :
1137 sample.birth().birth_thread()->thread_name().c_str(), 1138 sample.birth().birth_thread()->thread_name().c_str(),
1138 (combined_selectors_ & DEATH_THREAD) ? "*" : 1139 (combined_selectors_ & DEATH_THREAD) ? "*" :
1139 sample.DeathThreadName().c_str()); 1140 sample.DeathThreadName().c_str());
1140 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE), 1141 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE),
1141 !(combined_selectors_ & BIRTH_FUNCTION), 1142 !(combined_selectors_ & BIRTH_FUNCTION),
1142 output); 1143 output);
1143 } 1144 }
1144 1145
1145 } // namespace tracked_objects 1146 } // namespace tracked_objects
OLDNEW
« 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