diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 23:26:14 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 23:26:14 +0000 |
commit | 896e797be630e63354c66edd2ee6575c70fcafbe (patch) | |
tree | 5918d5bca28d21b975fd8d0e6eae0dbce2b55b01 /base/debug/trace_event_impl.cc | |
parent | 33867ea06bfe7389a165b7413f4c4f888705626d (diff) | |
download | chromium_src-896e797be630e63354c66edd2ee6575c70fcafbe.zip chromium_src-896e797be630e63354c66edd2ee6575c70fcafbe.tar.gz chromium_src-896e797be630e63354c66edd2ee6575c70fcafbe.tar.bz2 |
Don't use StaticMemorySingletonTraits for TraceLog.
Let's try this out as it's not clear to me that the extra complexity is needed. If code in the field is using this object at shutdown after the exit manager has destructed, then there'll be null dereferences now anyways. Also, we shouldn't have C++ static objects as they should all be using Singleton.
BUG=258047
R=nduca@chromium.org, scheib@chromium.org
Review URL: https://codereview.chromium.org/18338004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug/trace_event_impl.cc')
-rw-r--r-- | base/debug/trace_event_impl.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc index 895d2dd..af5591b 100644 --- a/base/debug/trace_event_impl.cc +++ b/base/debug/trace_event_impl.cc @@ -36,7 +36,7 @@ class DeleteTraceLogForTesting { public: static void Delete() { Singleton<base::debug::TraceLog, - StaticMemorySingletonTraits<base::debug::TraceLog> >::OnExit(0); + LeakySingletonTraits<base::debug::TraceLog> >::OnExit(0); } }; @@ -743,7 +743,7 @@ void TraceLog::NotificationHelper::SendNotificationIfAny() { // static TraceLog* TraceLog::GetInstance() { - return Singleton<TraceLog, StaticMemorySingletonTraits<TraceLog> >::get(); + return Singleton<TraceLog, LeakySingletonTraits<TraceLog> >::get(); } // static @@ -775,6 +775,7 @@ TraceLog::Options TraceLog::TraceOptionsFromString(const std::string& options) { TraceLog::TraceLog() : enable_count_(0), num_traces_recorded_(0), + event_callback_(NULL), dispatching_to_observer_list_(false), process_sort_index_(0), watch_category_(NULL), @@ -1384,10 +1385,6 @@ void TraceLog::DeleteForTesting() { DeleteTraceLogForTesting::Delete(); } -void TraceLog::Resurrect() { - StaticMemorySingletonTraits<TraceLog>::Resurrect(); -} - void TraceLog::SetProcessID(int process_id) { process_id_ = process_id; // Create a FNV hash from the process ID for XORing. |