Add SandboxExtension abstraction and use it for the injected bundle extension
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Nov 2010 20:01:27 +0000 (20:01 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Nov 2010 20:01:27 +0000 (20:01 +0000)
commit035ad9aabdb11bb1cae76d9eeb30bc31bff7752e
tree2526c241a52fcb13507961c16f139d2d6e6907e3
parent29dfc6c1477c2678ca5ffdc01f9cff6f83b0040c
Add SandboxExtension abstraction and use it for the injected bundle extension
https://bugs.webkit.org/show_bug.cgi?id=49817

Reviewed by Sam Weinig.

WebCore:

Export fileSystemRepresentation symbol needed by WebKit2.

* WebCore.exp.in:

WebKit2:

* Shared/SandboxExtension.h:
Add SandboxExtension abstraction.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Instead of encoding/decoding a token, encode/decode the sandbox extension handle.

* Shared/mac/SandboxExtensionMac.mm: Added.
Add Mac implementation of SandboxExtension.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
Create a SandboxExtension::Handle object.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::setSandboxExtension):
Set the sandbox extension.

* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
Consume the sandbox extension.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Create a sandbox extension and set it on the injected bundle.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp.in
WebKit2/ChangeLog
WebKit2/Shared/SandboxExtension.h [new file with mode: 0644]
WebKit2/Shared/WebProcessCreationParameters.cpp
WebKit2/Shared/WebProcessCreationParameters.h
WebKit2/Shared/mac/SandboxExtensionMac.mm [new file with mode: 0644]
WebKit2/UIProcess/WebContext.cpp
WebKit2/WebKit2.xcodeproj/project.pbxproj
WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp
WebKit2/WebProcess/WebProcess.cpp