summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 00:37:40 +0000
committerhshi@chromium.org <hshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 00:37:40 +0000
commit18c0fac7d1d48e2b85db9feb5bfc14ed0354cc8f (patch)
tree7f07fa8ebc92679f4970bff64341f20c7fbba79b
parent2057da420d85e0324b919c3edec0ba3042cec8ef (diff)
downloadchromium_src-18c0fac7d1d48e2b85db9feb5bfc14ed0354cc8f.zip
chromium_src-18c0fac7d1d48e2b85db9feb5bfc14ed0354cc8f.tar.gz
chromium_src-18c0fac7d1d48e2b85db9feb5bfc14ed0354cc8f.tar.bz2
Make InotifyReader a leaky lazy instance.
Fix a lifetime problem with the lazy instance InotifyReader and the singleton PluginService. The PluginService has an indirect dependency on InotifyReader on Linux. By making InotifyReader a leaky lazy instance, we can avoid releasing the inotify file descriptors while there are still registered watchers. BUG=156110 TEST=CQ, manual test Review URL: https://chromiumcodereview.appspot.com/11183043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162582 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/files/file_path_watcher_linux.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index 9e7e394..1438539 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -207,7 +207,7 @@ void InotifyReaderCallback(InotifyReader* reader, int inotify_fd,
}
}
-static base::LazyInstance<InotifyReader> g_inotify_reader =
+static base::LazyInstance<InotifyReader>::Leaky g_inotify_reader =
LAZY_INSTANCE_INITIALIZER;
InotifyReader::InotifyReader()