| Index: base/process_util_win.cc
|
| diff --git a/base/process_util_win.cc b/base/process_util_win.cc
|
| index 9aa7f4471a9b0f0fec6de806f0a503c70ad6cb55..09a8e18fce47b7b8052accd0041d23abec1a56cc 100644
|
| --- a/base/process_util_win.cc
|
| +++ b/base/process_util_win.cc
|
| @@ -271,7 +271,7 @@ bool LaunchProcess(const string16& cmdline,
|
| bool LaunchProcess(const CommandLine& cmdline,
|
| const LaunchOptions& options,
|
| ProcessHandle* process_handle) {
|
| - return LaunchProcess(cmdline.command_line_string(), options, process_handle);
|
| + return LaunchProcess(cmdline.GetCommandLineString(), options, process_handle);
|
| }
|
|
|
| // Attempts to kill the process identified by the given process
|
| @@ -317,7 +317,9 @@ bool GetAppOutput(const CommandLine& cl, std::string* output) {
|
| return false;
|
| }
|
|
|
| - // Now create the child process
|
| + scoped_ptr_malloc<wchar_t> writable_command_line_string(
|
| + ::_wcsdup(cl.GetCommandLineString().c_str()));
|
| +
|
| PROCESS_INFORMATION proc_info = { 0 };
|
| STARTUPINFO start_info = { 0 };
|
|
|
| @@ -330,7 +332,7 @@ bool GetAppOutput(const CommandLine& cl, std::string* output) {
|
|
|
| // Create the child process.
|
| if (!CreateProcess(NULL,
|
| - const_cast<wchar_t*>(cl.command_line_string().c_str()),
|
| + writable_command_line_string.get(),
|
| NULL, NULL,
|
| TRUE, // Handles are inherited.
|
| 0, NULL, NULL, &start_info, &proc_info)) {
|
|
|