Bug 93773

Summary: Enable XPC Service based WebProcess with runtime flag
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Updated patch mitz: review+

Description Sam Weinig 2012-08-11 21:23:47 PDT
Enable XPC Service base WebProcess with runtime flag
Comment 1 Sam Weinig 2012-08-11 21:35:36 PDT
Created attachment 157885 [details]
Patch
Comment 2 mitz 2012-08-11 21:56:02 PDT
Comment on attachment 157885 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=157885&action=review

> Source/WTF/ChangeLog:3
> +        Enable XPC Service base WebProcess with runtime flag

based?

> Source/WebKit2/ChangeLog:3
> +        Enable XPC Service base WebProcess with runtime flag

based?

> Tools/ChangeLog:3
> +        Enable XPC Service base WebProcess with runtime flag

based?

> Tools/Scripts/webkitdirs.pm:2697
> +  --guard-malloc                    Enable Guard Malloc (Mac OS X only)
> +  --use-web-process-xpc-service     Launch the WebProcess as an XPC Service (Mac OS X only)

Could drop “Mac”

> Tools/Scripts/webkitdirs.pm:2729
> +        $ENV{__XPC_DYLD_INSERT_LIBRARIES} = $productDir . "/WebProcessShim.dylib";

Shouldn’t this copy and append to DYLD_INSERT_LIBRARIES so that guard malloc works?
Shouldn’t the UI process unset these so that they don’t propagate to other processes it launches?

> Tools/Scripts/webkitdirs.pm:2772
> +            $ENV{__XPC_DYLD_FRAMEWORK_PATH} = $productDir;
> +            $ENV{__XPC_DYLD_INSERT_LIBRARIES} = $productDir . "/WebProcessShim.dylib";

Shouldn’t the UI process unset these so that they don’t propagate to other processes it launches?

> Tools/Scripts/webkitdirs.pm:2779
> +            die "Targetting the WebProcess is not compatible with using an XPC Service for the WebProcess at this time.";

I think it’s either “the Web process” or “WebProcess”, but not “the WebProcess”.
Comment 3 Sam Weinig 2012-08-11 22:15:49 PDT
(In reply to comment #2)
> (From update of attachment 157885 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=157885&action=review
> 
> > Source/WTF/ChangeLog:3
> > +        Enable XPC Service base WebProcess with runtime flag
> 
> based?
> 
> > Source/WebKit2/ChangeLog:3
> > +        Enable XPC Service base WebProcess with runtime flag
> 
> based?
> 
> > Tools/ChangeLog:3
> > +        Enable XPC Service base WebProcess with runtime flag
> 
> based?
> 
> > Tools/Scripts/webkitdirs.pm:2697
> > +  --guard-malloc                    Enable Guard Malloc (Mac OS X only)
> > +  --use-web-process-xpc-service     Launch the WebProcess as an XPC Service (Mac OS X only)
> 
> Could drop “Mac”
> 
> > Tools/Scripts/webkitdirs.pm:2729
> > +        $ENV{__XPC_DYLD_INSERT_LIBRARIES} = $productDir . "/WebProcessShim.dylib";
> 
> Shouldn’t this copy and append to DYLD_INSERT_LIBRARIES so that guard malloc works?

Yes.

> Shouldn’t the UI process unset these so that they don’t propagate to other processes it launches?

Unfortunately, that does work with the __XPC variants of these. Before this is the default, we will have to find a way of doing it, but I don't have it yet. 

> 
> > Tools/Scripts/webkitdirs.pm:2772
> > +            $ENV{__XPC_DYLD_FRAMEWORK_PATH} = $productDir;
> > +            $ENV{__XPC_DYLD_INSERT_LIBRARIES} = $productDir . "/WebProcessShim.dylib";
> 
> Shouldn’t the UI process unset these so that they don’t propagate to other processes it launches?
> 
> > Tools/Scripts/webkitdirs.pm:2779
> > +            die "Targetting the WebProcess is not compatible with using an XPC Service for the WebProcess at this time.";
> 
> I think it’s either “the Web process” or “WebProcess”, but not “the WebProcess”.

Ok.
Comment 4 Build Bot 2012-08-11 22:18:07 PDT
Comment on attachment 157885 [details]
Patch

Attachment 157885 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13474814
Comment 5 Sam Weinig 2012-08-11 22:21:51 PDT
Created attachment 157886 [details]
Patch
Comment 6 Sam Weinig 2012-08-11 22:23:28 PDT
Created attachment 157887 [details]
Updated patch
Comment 7 Sam Weinig 2012-08-11 22:29:47 PDT
Committed r125361: <http://trac.webkit.org/changeset/125361>