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

Unified Diff: chrome/common/ipc_logging.cc

Issue 28154: Make IPC::Logging register to watch for message loop destruction. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
« no previous file with comments | « chrome/common/ipc_logging.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_logging.cc
===================================================================
--- chrome/common/ipc_logging.cc (revision 10364)
+++ chrome/common/ipc_logging.cc (working copy)
@@ -96,10 +96,11 @@
enabled_ = true;
SetLoggerFunctions(g_log_function_mapping);
#endif
+
+ MessageLoop::current()->AddDestructionObserver(this);
}
Logging::~Logging() {
- watcher_.StopWatching();
}
Logging* Logging::current() {
@@ -117,6 +118,10 @@
RegisterWaitForEvent(!enabled_);
}
+void Logging::WillDestroyCurrentMessageLoop() {
+ watcher_.StopWatching();
+}
+
void Logging::SetLoggerFunctions(LogFunction *functions) {
log_function_mapping_ = functions;
}
« no previous file with comments | « chrome/common/ipc_logging.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698