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

Unified Diff: content/app/content_main_runner.cc

Issue 2023133003: Add Static Initializer for leak detector TLS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 95b852619e5c5bb8c793575a63a7080d8e0315c1..c58bff7ce700dd40027327958f3ee15efe58b57c 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -106,6 +106,10 @@
#endif // OS_POSIX
+#if defined(OS_CHROMEOS)
+#include "components/metrics/leak_detector/leak_detector.h"
+#endif
+
#if defined(USE_NSS_CERTS)
#include "crypto/nss_util.h"
#endif
@@ -756,6 +760,10 @@ class ContentMainRunnerImpl : public ContentMainRunner {
if (delegate_)
delegate_->SandboxInitialized(process_type);
+#if defined (OS_CHROMEOS)
+ metrics::LeakDetector::StaticInit();
Primiano Tucci (use gerrit) 2016/06/01 21:26:30 maybe add a comment explaining that the TLS slot n
Simon Que 2016/06/02 17:55:17 Done.
+#endif
+
// Return -1 to indicate no early termination.
return -1;
}

Powered by Google App Engine
This is Rietveld 408576698