Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.

Reviewed by Sam Weinig.

Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode and decode the uiProcessBundleResourcePath member variable.

* Shared/WebProcessCreationParameters.h:
Add uiProcessBundleResourcePath member variable.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
Set the uiProcessBundleResourcePath member variable.

* WebProcess/com.apple.WebProcess.sb:
Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.

* WebProcess/mac/WebProcessMac.mm:
(WebKit::initializeSandbox):
When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.

(WebKit::WebProcess::platformInitializeWebProcess):
Remove the code that would consume a sandbox extension for the url cache path.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6 files changed