Index: base/trace_event/trace_event_memory.cc |
diff --git a/base/trace_event/trace_event_memory.cc b/base/trace_event/trace_event_memory.cc |
index 2bf6d38beab0d8659aa92729baee7e61327fddac..da03a50b6ab60c08d711f6dd4710e7b9dead27ad 100644 |
--- a/base/trace_event/trace_event_memory.cc |
+++ b/base/trace_event/trace_event_memory.cc |
@@ -70,13 +70,12 @@ void DeleteStackOnThreadCleanup(void* value) { |
delete stack; |
} |
-// Initializes the thread-local TraceMemoryStack pointer. Returns true on |
-// success or if it is already initialized. |
-bool InitThreadLocalStorage() { |
+// Initializes the thread-local TraceMemoryStack pointer. |
+void InitThreadLocalStorage() { |
if (tls_trace_memory_stack.initialized()) |
- return true; |
- // Initialize the thread-local storage key, returning true on success. |
- return tls_trace_memory_stack.Initialize(&DeleteStackOnThreadCleanup); |
+ return; |
+ // Initialize the thread-local storage key. |
+ tls_trace_memory_stack.Initialize(&DeleteStackOnThreadCleanup); |
} |
// Clean up thread-local-storage in the main thread. |
@@ -196,8 +195,7 @@ void TraceMemoryController::StartProfiling() { |
if (dump_timer_.IsRunning()) |
return; |
DVLOG(1) << "Starting trace memory"; |
- if (!InitThreadLocalStorage()) |
- return; |
+ InitThreadLocalStorage(); |
ScopedTraceMemory::set_enabled(true); |
// Call ::HeapProfilerWithPseudoStackStart(). |
heap_profiler_start_function_(&GetPseudoStack); |