Fix for <rdar://problem/8711576> The web process should be able to read resources...
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jan 2011 22:39:30 +0000 (22:39 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Jan 2011 22:39:30 +0000 (22:39 +0000)
commitb2ffea64f9b84b3c46987896d682d63b6d8fe377
treecccc8b9c74341d5abac375b09a9b7e4fbcafbb33
parentec3259e6f28ce66ec520773313a5157fe2debdd3
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: https://svn.webkit.org/repository/webkit/trunk@75822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/Shared/WebProcessCreationParameters.cpp
WebKit2/Shared/WebProcessCreationParameters.h
WebKit2/UIProcess/mac/WebContextMac.mm
WebKit2/WebProcess/com.apple.WebProcess.sb
WebKit2/WebProcess/mac/WebProcessMac.mm