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

Unified Diff: chrome/browser/lifetime/scoped_keep_alive.h

Issue 2118473002: 😴 Skip some KeepAlive registrations on shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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: chrome/browser/lifetime/scoped_keep_alive.h
diff --git a/chrome/browser/lifetime/scoped_keep_alive.h b/chrome/browser/lifetime/scoped_keep_alive.h
index 5dbc4b9196b2ca11e51ef6e7f506321f8771da5b..48c32680a9ae849cf00b206f9deb3bfa0feb2bea 100644
--- a/chrome/browser/lifetime/scoped_keep_alive.h
+++ b/chrome/browser/lifetime/scoped_keep_alive.h
@@ -12,6 +12,8 @@ enum class KeepAliveRestartOption;
// Registers with KeepAliveRegistry on creation and unregisters them
// on destruction. Use these objects with a scoped_ptr for easy management.
+// Note: The registration will hit a CHECK if it happens while we are
+// shutting down. Caller code should make sure that this can't happen.
class ScopedKeepAlive {
public:
ScopedKeepAlive(KeepAliveOrigin origin, KeepAliveRestartOption restart);

Powered by Google App Engine
This is Rietveld 408576698