Bug 44537 - WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32-bit mode
Summary: WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-08-24 10:53 PDT by Sam Weinig
Modified: 2010-08-24 20:11 PDT (History)
0 users

See Also:


Attachments
Patch (2.61 KB, patch)
2010-08-24 19:47 PDT, Sam Weinig
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-08-24 10:53:25 PDT
WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32-bit mode
Comment 1 Sam Weinig 2010-08-24 10:53:59 PDT
<rdar://problem/8348100>
Comment 2 Sam Weinig 2010-08-24 19:47:18 PDT
Created attachment 65362 [details]
Patch
Comment 3 Mark Rowe (bdash) 2010-08-24 20:05:20 PDT
Comment on attachment 65362 [details]
Patch

> +
> +    posix_spawnattr_t attr;
> +    posix_spawnattr_init(&attr);
> +
> +#if CPU(X86)
> +    // We spawn a 32-bit child process if the host is 32-bit. This allows checking
> +    // the "Open in 32-bit mode" check box in the finder and getting a 32-bit WebProcess.

I don’t like the way this comment is worded.  It would be better to say something about having the child process run as the same architecture as the parent process.  The Finder in particular isn’t all that interesting here.

> +    cpu_type_t cpuTypes[] = { CPU_TYPE_X86 };    
> +#else
> +    cpu_type_t cpuTypes[] = { CPU_TYPE_ANY };
> +#endif
> +    size_t outCount = 0;
> +    posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &outCount);

You could move this call in to the #if and drop the #else completely.

r=me
Comment 4 Sam Weinig 2010-08-24 20:11:20 PDT
Landed in 65968.