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

Unified Diff: chrome/browser/importer/firefox_importer_unittest_utils_mac.cc

Issue 7870008: Wait properly for renderer crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win? Created 9 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
Index: chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
diff --git a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
index 09a29a4dc82ba516436f5d8f21f73226da2267e4..1bc8d164c581a0da49c05a21420082ca3d078d19 100644
--- a/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
+++ b/chrome/browser/importer/firefox_importer_unittest_utils_mac.cc
@@ -7,6 +7,7 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/file_path.h"
+#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/test/test_timeouts.h"
#include "chrome/browser/importer/firefox_importer_utils.h"
@@ -30,7 +31,7 @@ const char kTestChannelID[] = "T1";
// |handle| - On return, the process handle to use to communicate with the
// child.
bool LaunchNSSDecrypterChildProcess(const FilePath& nss_path,
- const IPC::Channel& channel, base::ProcessHandle* handle) {
+ IPC::Channel* channel, base::ProcessHandle* handle) {
CommandLine cl(*CommandLine::ForCurrentProcess());
cl.AppendSwitchASCII(switches::kTestChildProcess, "NSSDecrypterChildProcess");
@@ -44,12 +45,13 @@ bool LaunchNSSDecrypterChildProcess(const FilePath& nss_path,
env.push_back(dyld_override);
base::file_handle_mapping_vector fds_to_map;
- const int ipcfd = channel.GetClientFileDescriptor();
+ const int ipcfd = channel->TakeClientFileDescriptor();
if (ipcfd > -1) {
darin (slow to review) 2011/09/15 05:43:37 shouldn't this be "ipcfd != -1" ?
Paweł Hajdan Jr. 2011/09/15 18:36:44 Done.
fds_to_map.push_back(std::pair<int,int>(ipcfd, kPrimaryIPCChannel + 3));
} else {
return false;
}
+ file_util::ScopedFD client_file_descriptor_closer(&ipcfd);
bool debug_on_start = CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDebugChildren);
@@ -139,7 +141,7 @@ bool FFUnitTestDecryptorProxy::Setup(const FilePath& nss_path) {
// Spawn child and set up sync IPC connection.
bool ret = LaunchNSSDecrypterChildProcess(nss_path,
- *(channel_.get()),
+ channel_.get(),
&child_process_);
return ret && (child_process_ != 0);
}

Powered by Google App Engine
This is Rietveld 408576698