[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
weinig at apple.com
weinig at apple.com
Wed Dec 22 12:31:48 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7f2f86c3b69f5c94e15a1edb7568e2c9b31521bf
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 25 03:10:12 2010 +0000
WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32-bit mode
<rdar://problem/8348100>
https://bugs.webkit.org/show_bug.cgi?id=44537
Reviewed by Mark Rowe.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Use posix_spawnattr_setbinpref_np
to tell posix_spawn to launch the WebProcess in 32-bit mode when the UIProcess
is running in 32-bit mode.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65968 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 6bbe073..f0d5181 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-24 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Mark Rowe.
+
+ WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32-bit mode
+ <rdar://problem/8348100>
+ https://bugs.webkit.org/show_bug.cgi?id=44537
+
+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+ (WebKit::ProcessLauncher::launchProcess): Use posix_spawnattr_setbinpref_np
+ to tell posix_spawn to launch the WebProcess in 32-bit mode when the UIProcess
+ is running in 32-bit mode.
+
2010-08-24 Mark Rowe <mrowe at apple.com>
Rubber-stamped by Sam Weinig.
diff --git a/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
index 4851b74..b0c9afb 100644
--- a/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
+++ b/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
@@ -29,6 +29,7 @@
#include "WebProcess.h"
#include "WebSystemInterface.h"
#include <crt_externs.h>
+#include <mach/machine.h>
#include <runtime/InitializeThreading.h>
#include <servers/bootstrap.h>
#include <spawn.h>
@@ -66,9 +67,22 @@ void ProcessLauncher::launchProcess()
kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.data()), listeningPort, 0);
if (kr)
NSLog(@"bootstrap_register2 result: %x", kr);
-
+
+ posix_spawnattr_t attr;
+ posix_spawnattr_init(&attr);
+
+#if CPU(X86)
+ // Ensure that the child process runs as the same architecture as the parent process.
+ cpu_type_t cpuTypes[] = { CPU_TYPE_X86 };
+ size_t outCount = 0;
+ posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &outCount);
+#endif
+
pid_t processIdentifier;
- int result = posix_spawn(&processIdentifier, path, 0, 0, (char *const*)args, *_NSGetEnviron());
+ int result = posix_spawn(&processIdentifier, path, 0, &attr, (char *const*)args, *_NSGetEnviron());
+
+ posix_spawnattr_destroy(&attr);
+
if (result)
NSLog(@"posix_spawn result: %d", result);
@@ -87,7 +101,7 @@ void ProcessLauncher::terminateProcess()
static void* webThreadBody(void* context)
{
mach_port_t serverPort = static_cast<mach_port_t>(reinterpret_cast<uintptr_t>(context));
-
+
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
InitWebCoreSystemInterface();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list