Index: base/memory/singleton.h |
diff --git a/base/memory/singleton.h b/base/memory/singleton.h |
index 0d4fc8990c443f3b025c37a5937bf232ca4ac14d..28fda3d22e4b86589aa036efae500bfea200e675 100644 |
--- a/base/memory/singleton.h |
+++ b/base/memory/singleton.h |
@@ -116,6 +116,12 @@ struct StaticMemorySingletonTraits { |
static void Delete(Type* p) { |
if (p != NULL) |
p->Type::~Type(); |
+ |
+ // Only in unittests, automatically Resurrect() the singleton so that tests |
+ // do not have to manually call it. See <http://crbug.com/258047>. |
+#if defined(UNIT_TEST) |
+ Resurrect(); |
+#endif |
} |
static const bool kRegisterAtExit = true; |