Bug 209091

Summary: [Cocoa] Only set CF prefs direct mode for the WebContent process
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: WebKit Misc.Assignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, darin, slewis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Per Arne Vollan 2020-03-13 15:53:45 PDT
Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should be enabled only in WebContentServiceInitializer.
Comment 1 Per Arne Vollan 2020-03-13 15:55:28 PDT
rdar://problem/60337842
Comment 2 Per Arne Vollan 2020-03-13 15:57:12 PDT
Created attachment 393548 [details]
Patch
Comment 3 Brent Fulgham 2020-03-13 15:59:17 PDT
Comment on attachment 393548 [details]
Patch

Ah! Yes, this is a better place for this. r=me.
Comment 4 Per Arne Vollan 2020-03-13 16:10:35 PDT
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 393548 [details]
> Patch
> 
> Ah! Yes, this is a better place for this. r=me.

Thanks for reviewing!
Comment 5 Per Arne Vollan 2020-03-13 16:46:06 PDT
Created attachment 393556 [details]
Patch
Comment 6 Darin Adler 2020-03-15 17:34:50 PDT
Comment on attachment 393556 [details]
Patch

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

> Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:62
> +                    // Enable CF prefs direct mode to avoid connecting to the CF prefs daemon.

I would have written a comment more like:

    // Enable CFPrefs direct mode to avoid unsuccessfully attempting to connect to the daemon and getting blocked by the sandbox.
Comment 7 Per Arne Vollan 2020-03-16 08:47:04 PDT
Created attachment 393655 [details]
Patch
Comment 8 Per Arne Vollan 2020-03-16 10:16:43 PDT
Created attachment 393657 [details]
Patch
Comment 9 Per Arne Vollan 2020-03-16 10:17:24 PDT
(In reply to Darin Adler from comment #6)
> Comment on attachment 393556 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=393556&action=review
> 
> > Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:62
> > +                    // Enable CF prefs direct mode to avoid connecting to the CF prefs daemon.
> 
> I would have written a comment more like:
> 
>     // Enable CFPrefs direct mode to avoid unsuccessfully attempting to
> connect to the daemon and getting blocked by the sandbox.

Fixed.

Thanks for reviewing!
Comment 10 Brent Fulgham 2020-03-16 12:02:31 PDT
Comment on attachment 393657 [details]
Patch

r=me
Comment 11 Per Arne Vollan 2020-03-16 12:06:28 PDT
Comment on attachment 393657 [details]
Patch

Thanks for reviewing!
Comment 12 WebKit Commit Bot 2020-03-16 12:51:04 PDT
Comment on attachment 393657 [details]
Patch

Clearing flags on attachment: 393657

Committed r258512: <https://trac.webkit.org/changeset/258512>
Comment 13 WebKit Commit Bot 2020-03-16 12:51:05 PDT
All reviewed patches have been landed.  Closing bug.