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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10949027: Close leaking FDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | content/browser/child_process_launcher.cc » ('j') | content/browser/child_process_launcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 0ee484c8bba3d5f73d2596c45efa6fb3f3816859..a6c47f8d6fae4f9744b8616e693ce6c597d6a663 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1667,8 +1667,10 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
base::GlobalDescriptors::Mapping* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);
if (crash_signal_fd >= 0) {
+ // The caller becomes the owner of the passed FD, so we dup it as we need to
+ // keep ours alive.
mappings->push_back(std::pair<base::GlobalDescriptors::Key, int>(
- kCrashDumpSignal, crash_signal_fd));
+ kCrashDumpSignal, dup(crash_signal_fd)));
piman 2012/09/20 07:03:03 I don't get it. You're changing the semantics to a
}
}
#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
« no previous file with comments | « no previous file | content/browser/child_process_launcher.cc » ('j') | content/browser/child_process_launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698