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

Unified Diff: base/at_exit.cc

Issue 10582012: For unit tests, track additions to AtExitManager and warn. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Back off to a warning. Created 8 years, 6 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/at_exit.cc
diff --git a/base/at_exit.cc b/base/at_exit.cc
index 0fba355698fbebc643fd3225d1323ec64964eb7d..db9cfbf4cf06397259e4c5539f128904e5d1272a 100644
--- a/base/at_exit.cc
+++ b/base/at_exit.cc
@@ -79,4 +79,18 @@ AtExitManager::AtExitManager(bool shadow) : next_manager_(g_top_manager) {
g_top_manager = this;
}
+// static
+void* AtExitManager::CurrentAtExitManager() {
+ return g_top_manager;
+}
+
+// static
+size_t AtExitManager::CurrentAtExitCallbackStackSize() {
+ if (g_top_manager) {
+ return g_top_manager->stack_.size();
+ }
+ return 0;
+}
+
+
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698