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

andersca at apple.com andersca at apple.com
Wed Dec 22 14:43:59 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bd6aeb6fd848b6c94cc5b48b559093d9ae403045
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 21:28:01 2010 +0000

    <rdar://problem/8036034>
    WebKit2's WebProcess dies immediately on Mac due to DYLD_FRAMEWORK_PATH problem
    
    Reviewed by Sam Weinig.
    
    Pass the path to the WebKit2 framework along to the web process and don't rely on DYLD_FRAMEWORK_PATH being set.
    
    * Shared/mac/CommandLineMac.cpp:
    (WebKit::CommandLine::parse):
    * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
    (WebKit::ProcessLauncher::launchProcess):
    * mac/MainMac.cpp:
    (main):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69992 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index e053532..ef32833 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-18  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        <rdar://problem/8036034>
+        WebKit2's WebProcess dies immediately on Mac due to DYLD_FRAMEWORK_PATH problem
+
+        Pass the path to the WebKit2 framework along to the web process and don't rely on DYLD_FRAMEWORK_PATH being set.
+
+        * Shared/mac/CommandLineMac.cpp:
+        (WebKit::CommandLine::parse):
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::launchProcess):
+        * mac/MainMac.cpp:
+        (main):
+
 2010-10-18  Jessie Berlin  <jberlin at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit2/Shared/mac/CommandLineMac.cpp b/WebKit2/Shared/mac/CommandLineMac.cpp
index 8540b12..185aaea 100644
--- a/WebKit2/Shared/mac/CommandLineMac.cpp
+++ b/WebKit2/Shared/mac/CommandLineMac.cpp
@@ -32,10 +32,10 @@ namespace WebKit {
 
 bool CommandLine::parse(int argc, char** argv)
 {
-    if (!(argc % 2))
+    if ((argc % 2))
         return false;
 
-    for (int i = 1; i < argc; i += 2) {
+    for (int i = 2; i < argc; i += 2) {
         if (!argv[i] || *argv[i] != '-')
             return false;
 
diff --git a/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
index fbeab49..34cf400 100644
--- a/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
+++ b/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
@@ -97,15 +97,18 @@ void ProcessLauncher::launchProcess()
     
     // Insert a send right so we can send to it.
     mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND);
-    
-    NSString *webProcessAppPath = [[NSBundle bundleWithIdentifier:@"com.apple.WebKit2"] pathForAuxiliaryExecutable:@"WebProcess.app"];
+
+    NSBundle *webKit2Bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebKit2"];
+    const char* bundlePath = [[webKit2Bundle executablePath] fileSystemRepresentation];
+
+    NSString *webProcessAppPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
     NSString *webProcessAppExecutablePath = [[NSBundle bundleWithPath:webProcessAppPath] executablePath];
 
     // Make a unique, per pid, per process launcher web process service name.
     CString serviceName = String::format("com.apple.WebKit.WebProcess-%d-%p", getpid(), this).utf8();
 
     const char* path = [webProcessAppExecutablePath fileSystemRepresentation];
-    const char* args[] = { path, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), "-parentprocessname", processName(), 0 };
+    const char* args[] = { path, bundlePath, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), "-parentprocessname", processName(), 0 };
 
     // Register ourselves.
     kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.data()), listeningPort, 0);
diff --git a/WebKit2/mac/MainMac.cpp b/WebKit2/mac/MainMac.cpp
index 2f1764b..0bba8af 100644
--- a/WebKit2/mac/MainMac.cpp
+++ b/WebKit2/mac/MainMac.cpp
@@ -38,7 +38,10 @@ int main(int argc, char** argv)
 {
     closeUnusedFileDescriptors();
 
-    static void* frameworkLibrary = dlopen("/System/Library/PrivateFrameworks/WebKit2.framework/WebKit2", RTLD_NOW);
+    if (argc < 2)
+        return EXIT_FAILURE;
+
+    static void* frameworkLibrary = dlopen(argv[1], RTLD_NOW);
     if (!frameworkLibrary) {
         fprintf(stderr, "Unable to load WebKit2.framework: %s\n", dlerror());
         return EXIT_FAILURE;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list