[iOS] Do not create sandbox reports when the UI process cannot issue extensions to...
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2020 00:06:20 +0000 (00:06 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2020 00:06:20 +0000 (00:06 +0000)
commit770ac090c5ebd162a36d4e3392336736c718373a
tree4cfb1a326550faa5632f8c88299ccb0e171eee00
parent3164646fc066cab76320df579306c892c8122e6e
[iOS] Do not create sandbox reports when the UI process cannot issue extensions to diagnostics service
https://bugs.webkit.org/show_bug.cgi?id=207279
<rdar://problem/59030957>
Source/WebKit:

Reviewed by Brent Fulgham.

Do not create sandbox reports when the UI process cannot issue mach extensions to the diagnostics service.
The majority of clients are capable of doing this.

No new tests, since it is not trivial to test if no sandbox reports are generated for a violation.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::create):
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
(WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
(WebKit::SandboxExtension::createHandleForMachLookup):
* Shared/SandboxExtension.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):

Source/WTF:

Reviewed by Brent Fulgham.

Add flag which avoids generating sandbox reports.

* wtf/spi/darwin/SandboxSPI.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@255874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/spi/darwin/SandboxSPI.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
Source/WebKit/Shared/SandboxExtension.h
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm