Title: [104190] trunk/Tools
- Revision
- 104190
- Author
- [email protected]
- Date
- 2012-01-05 11:55:31 -0800 (Thu, 05 Jan 2012)
Log Message
Prepend Safari.exe's path to the command-line passed to CreateProcess
Safari expects the first argument in the command-line to be the path to Safari.exe itself.
This is how things get set up when Safari is launched normally (e.g., by Explorer). Safari
thus ignores the first argument when looking for command-line arguments. WebKitLauncherWin
was not including the path to Safari.exe in the command-line, so Safari was ignoring the
first argument that WebKitLauncherWin was trying to pass to it.
Fixes <http://webkit.org/b/56571> First argument passed to WebKit.exe is ignored by Safari
Reviewed by Steve Falkenburg.
* WebKitLauncherWin/WebKitLauncherWin.cpp:
(_tWinMain): Construct a command-line for CreateProcess that first contains a double-quoted
path to Safari.exe, then contains any arguments that were passed to WebKitLauncherWin.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (104189 => 104190)
--- trunk/Tools/ChangeLog 2012-01-05 19:55:22 UTC (rev 104189)
+++ trunk/Tools/ChangeLog 2012-01-05 19:55:31 UTC (rev 104190)
@@ -1,5 +1,23 @@
2012-01-05 Adam Roben <[email protected]>
+ Prepend Safari.exe's path to the command-line passed to CreateProcess
+
+ Safari expects the first argument in the command-line to be the path to Safari.exe itself.
+ This is how things get set up when Safari is launched normally (e.g., by Explorer). Safari
+ thus ignores the first argument when looking for command-line arguments. WebKitLauncherWin
+ was not including the path to Safari.exe in the command-line, so Safari was ignoring the
+ first argument that WebKitLauncherWin was trying to pass to it.
+
+ Fixes <http://webkit.org/b/56571> First argument passed to WebKit.exe is ignored by Safari
+
+ Reviewed by Steve Falkenburg.
+
+ * WebKitLauncherWin/WebKitLauncherWin.cpp:
+ (_tWinMain): Construct a command-line for CreateProcess that first contains a double-quoted
+ path to Safari.exe, then contains any arguments that were passed to WebKitLauncherWin.
+
+2012-01-05 Adam Roben <[email protected]>
+
Stop using explicit memory management in WebKitLauncherWin
We now use stack-allocated STL objects instead.
Modified: trunk/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp (104189 => 104190)
--- trunk/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp 2012-01-05 19:55:22 UTC (rev 104189)
+++ trunk/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp 2012-01-05 19:55:31 UTC (rev 104190)
@@ -86,11 +86,13 @@
return 1;
SetEnvironmentVariable(TEXT("WEBKITNIGHTLY"), exePath);
+ tstring finalCommandLine = TEXT('"') + browserExe + TEXT("\" ") + commandLine;
+
// Launch Safari as a child process
STARTUPINFO startupInfo = {0};
startupInfo.cb = sizeof(startupInfo);
PROCESS_INFORMATION processInfo = {0};
- if (!CreateProcess(browserExe.c_str(), commandLine, 0, 0, FALSE, NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, 0, path.c_str(), &startupInfo, &processInfo))
+ if (!CreateProcess(browserExe.c_str(), const_cast<LPTSTR>(finalCommandLine.c_str()), 0, 0, FALSE, NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, 0, path.c_str(), &startupInfo, &processInfo))
MessageBox(0, TEXT("Safari could not be launched. Please make sure you have the latest version of Safari installed and try again. You can download Safari from http://www.apple.com/safari/download"), TEXT("Safari launch failed"), MB_ICONSTOP);
return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes