summaryrefslogtreecommitdiffstats
path: root/tools/traceline
diff options
context:
space:
mode:
authorchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 01:04:08 +0000
committerchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 01:04:08 +0000
commit7a89a9f94d6c310116da794a82fd99fc7753b057 (patch)
tree923514b0f39c6ee36f2045dc752e8d733f4217dc /tools/traceline
parentb26c549956d09d3756c51c29e02dd9dd43705ed7 (diff)
downloadchromium_src-7a89a9f94d6c310116da794a82fd99fc7753b057.zip
chromium_src-7a89a9f94d6c310116da794a82fd99fc7753b057.tar.gz
chromium_src-7a89a9f94d6c310116da794a82fd99fc7753b057.tar.bz2
Fix traceline to compile on Windows.
With these fixes, traceline compiles locally and on the try servers. TBR=deanm BUG=none TEST=traceline compiles Review URL: http://codereview.chromium.org/181043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/traceline')
-rw-r--r--tools/traceline/traceline/main.cc24
1 files changed, 14 insertions, 10 deletions
diff --git a/tools/traceline/traceline/main.cc b/tools/traceline/traceline/main.cc
index 97085eb..6d5d481 100644
--- a/tools/traceline/traceline/main.cc
+++ b/tools/traceline/traceline/main.cc
@@ -1259,16 +1259,20 @@ int main(int argc, char** argv) {
STARTUPINFO start_info = {0};
start_info.cb = sizeof(start_info);
- if (!CreateProcessA(NULL,
- argv[0],
- NULL,
- NULL,
- FALSE,
- CREATE_SUSPENDED,
- NULL,
- NULL,
- &start_info,
- &info)) {
+ int command_size = MultiByteToWideChar(CP_ACP, 0, argv[0], -1, NULL, 0);
+ LPWSTR command = new WCHAR[command_size];
+ MultiByteToWideChar(CP_ACP, 0, argv[0], -1, command, command_size);
+
+ if (!CreateProcess(NULL,
+ command,
+ NULL,
+ NULL,
+ FALSE,
+ CREATE_SUSPENDED,
+ NULL,
+ NULL,
+ &start_info,
+ &info)) {
NOTREACHED("Failed to launch \"%s\": %d\n", argv[0], GetLastError());
return 1;
}