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

Unified Diff: base/threading/thread_local_storage.cc

Issue 1124493002: Cleanup: given that TLS slot can't fail to initialize, remove bool return values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@parchild
Patch Set: Created 5 years, 8 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
Index: base/threading/thread_local_storage.cc
diff --git a/base/threading/thread_local_storage.cc b/base/threading/thread_local_storage.cc
index 54928ede272526bc4ac24bc4621facecfc9b9eee..0bb396cfd7966fbe493b43683f4bb59a5561c9ce 100644
--- a/base/threading/thread_local_storage.cc
+++ b/base/threading/thread_local_storage.cc
@@ -197,7 +197,7 @@ ThreadLocalStorage::Slot::Slot(TLSDestructorFunc destructor) {
Initialize(destructor);
}
-bool ThreadLocalStorage::StaticSlot::Initialize(TLSDestructorFunc destructor) {
+void ThreadLocalStorage::StaticSlot::Initialize(TLSDestructorFunc destructor) {
PlatformThreadLocalStorage::TLSKey key =
base::subtle::NoBarrier_Load(&g_native_tls_key);
if (key == PlatformThreadLocalStorage::TLS_KEY_OUT_OF_INDEXES ||
@@ -212,7 +212,6 @@ bool ThreadLocalStorage::StaticSlot::Initialize(TLSDestructorFunc destructor) {
// Setup our destructor.
g_tls_destructors[slot_] = destructor;
initialized_ = true;
- return true;
}
void ThreadLocalStorage::StaticSlot::Free() {

Powered by Google App Engine
This is Rietveld 408576698