[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

bweinstein at apple.com bweinstein at apple.com
Wed Dec 22 13:37:25 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 6fd2b354fa0d330f6c596b5eef7a2754f5e935fb
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 21 20:19:42 2010 +0000

    WebKit2 should look for WebKit2WebProcess.exe next to WebKit.dll
    https://bugs.webkit.org/show_bug.cgi?id=46209
    <rdar://problem/8445639>
    
    Reviewed by Adam Roben.
    
    Find WebKit2WebProcess.exe by getting the full path to WebKit.dll, and then
    removing the last path component and replacing it with WebKit2WebProcess.exe.
    
    * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
    (WebKit::ProcessLauncher::launchProcess):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f129f1e..b756263 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-21  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Adam Roben.
+
+        WebKit2 should look for WebKit2WebProcess.exe next to WebKit.dll
+        https://bugs.webkit.org/show_bug.cgi?id=46209
+        <rdar://problem/8445639>
+        
+        Find WebKit2WebProcess.exe by getting the full path to WebKit.dll, and then
+        removing the last path component and replacing it with WebKit2WebProcess.exe.
+
+        * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
+        (WebKit::ProcessLauncher::launchProcess):
+
 2010-09-21  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
index 22f1e71..755ca40 100644
--- a/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
+++ b/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
@@ -27,12 +27,15 @@
 
 #include "Connection.h"
 #include "RunLoop.h"
+#include <shlwapi.h>
 #include <wtf/text/WTFString.h>
 
 #if !defined(NDEBUG) && (!defined(DEBUG_INTERNAL) || defined(DEBUG_ALL))
 const LPCWSTR webProcessName = L"WebKit2WebProcess_debug.exe";
+const LPCWSTR webKitDLLName = L"WebKit_debug.dll";
 #else
 const LPCWSTR webProcessName = L"WebKit2WebProcess.exe";
+const LPCWSTR webKitDLLName = L"WebKit.dll";
 #endif
 
 namespace WebKit {
@@ -48,12 +51,25 @@ void ProcessLauncher::launchProcess()
 
     // Ensure that the child process inherits the client identifier.
     ::SetHandleInformation(clientIdentifier, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT);
-        
-    Vector<UChar> commandLineVector;
 
-    // FIXME: We would like to pass a full path to the .exe here.
+    // To get the full file path to WebKit2WebProcess.exe, we fild the location of WebKit.dll,
+    // remove the last path component, and then append WebKit2WebProcess(_debug).exe.
+    HMODULE webKitModule = ::GetModuleHandleW(webKitDLLName);
+    ASSERT(webKitModule);
+    if (!webKitModule)
+        return;
+
+    WCHAR pathStr[MAX_PATH];
+    if (!::GetModuleFileNameW(webKitModule, pathStr, _countof(pathStr)))
+        return;
+
+    ::PathRemoveFileSpecW(pathStr);
+    if (!::PathAppendW(pathStr, webProcessName))
+        return;
+
+    String commandLine(pathStr);
 
-    String commandLine(webProcessName);
+    Vector<UChar> commandLineVector;
     append(commandLineVector, commandLine);
     append(commandLineVector, " -mode webprocess");
     append(commandLineVector, " -clientIdentifier ");

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list