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

Side by Side Diff: base/tracked_objects.cc

Issue 50014: Fix a bunch of tiny near-bugs and bugs that static analysis identified... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/time_win_unittest.cc ('k') | chrome/browser/memory_details.cc » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/string_util.h" 9 #include "base/string_util.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // ThreadData maintains the central data for all births and death. 74 // ThreadData maintains the central data for all births and death.
75 75
76 // static 76 // static
77 ThreadData* ThreadData::first_ = NULL; 77 ThreadData* ThreadData::first_ = NULL;
78 // static 78 // static
79 Lock ThreadData::list_lock_; 79 Lock ThreadData::list_lock_;
80 80
81 // static 81 // static
82 ThreadData::Status ThreadData::status_ = ThreadData::UNINITIALIZED; 82 ThreadData::Status ThreadData::status_ = ThreadData::UNINITIALIZED;
83 83
84 ThreadData::ThreadData() : message_loop_(MessageLoop::current()) {} 84 ThreadData::ThreadData() : next_(NULL), message_loop_(MessageLoop::current()) {}
85 85
86 // static 86 // static
87 ThreadData* ThreadData::current() { 87 ThreadData* ThreadData::current() {
88 if (!tls_index_.initialized()) 88 if (!tls_index_.initialized())
89 return NULL; 89 return NULL;
90 90
91 ThreadData* registry = static_cast<ThreadData*>(tls_index_.Get()); 91 ThreadData* registry = static_cast<ThreadData*>(tls_index_.Get());
92 if (!registry) { 92 if (!registry) {
93 // We have to create a new registry for ThreadData. 93 // We have to create a new registry for ThreadData.
94 bool too_late_to_create = false; 94 bool too_late_to_create = false;
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 (combined_selectors_ & BIRTH_THREAD) ? "*" : 897 (combined_selectors_ & BIRTH_THREAD) ? "*" :
898 sample.birth().birth_thread()->ThreadName().c_str(), 898 sample.birth().birth_thread()->ThreadName().c_str(),
899 (combined_selectors_ & DEATH_THREAD) ? "*" : 899 (combined_selectors_ & DEATH_THREAD) ? "*" :
900 sample.DeathThreadName().c_str()); 900 sample.DeathThreadName().c_str());
901 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE), 901 sample.birth().location().Write(!(combined_selectors_ & BIRTH_FILE),
902 !(combined_selectors_ & BIRTH_FUNCTION), 902 !(combined_selectors_ & BIRTH_FUNCTION),
903 output); 903 output);
904 } 904 }
905 905
906 } // namespace tracked_objects 906 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « base/time_win_unittest.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698