[WK2][Soup] Support cache model in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=118343

Reviewed by Carlos Garcia Campos.

Original patch by Kwang Yul Seo <skyul@company100.net> and Csaba Osztrogonác <ossy@webkit.org>.

Copied cache model code from WebProcess.
NetworkProcess is configured not to use the WebCore memory cache.

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::getCacheDiskFreeSize):
(WebKit::getMemorySize):
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
Initialize soup cache.
(WebKit::NetworkProcess::platformSetCacheModel):
Copied code from WebProcess::platformSetCacheModel but removed
WebCore memory cache initialization because NetworkProcess does not use
the WebCore memory cache.
(WebKit::NetworkProcess::clearCacheForAllOrigins):
Copied code from WebProcess::clearCacheForAllOrigins.
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
Copied initialization code from WebProcessMainGtk.cpp.
(WebKit::NetworkProcessMain):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
Don't set the disk cache if NetworkProcess is used.
(WebKit::WebProcess::platformClearResourceCaches):
Don't clear the non-existing disk cache. (if NetworkProcess is used)
(WebKit::WebProcess::platformInitializeWebProcess):
Don't initialize the disk cache if NetworkProcess is used.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Add UNIX_DOMAIN_SOCKETS specific bits for supporting NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=110093

Reviewed by Martin Robinson.

Original patch by Balazs Kelemen <kbalazs@webkit.org>.

Adds the UNIX specific bits to support connections to the
NetworkProcess. Since the process of creating the pair of sockets
is exactly the same as in the PluginProcess, I've decided to
refactor it in ConnectionUnix::createPlatformConnection(). This
can be reused later to create a cross-platform solution and remove
all the ifdefs (see bug 110978).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::createPlatformConnection):
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::createWebProcessConnection):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: DataCloneError exception is not thrown when postMessage's second parameter is the source
port or the target port.

https://bugs.webkit.org/show_bug.cgi?id=124708

Patch by Michal Poteralski <m.poteralski@samsung.com> on 2013-12-09
Reviewed by Alexey Proskuryakov.

According to specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage

If the method was invoked with a second argument transfer then if any of the objects in the
transfer are either the source port or the target port (if any), then a DataCloneError
exception should be thrown. Currently an InvalidStateError exception is thrown what is an
incorrect behaviour.

The proposed solution is change to the correct the exception value.

Tests: fast/dom/Window/postMessage-clone-port-error.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage): Improve exception value

LayoutTests: DataCloneError exception is not thrown when postMessage's second parameter
is the source port or the target port.

https://bugs.webkit.org/show_bug.cgi?id=124708

Patch by Michal Poteralski <m.poteralski@samsung.com> on 2013-12-09
Reviewed by Alexey Proskuryakov.

Added layout test to check correctness of value thrown by postMessage:

* fast/dom/Window/postMessage-clone-port-error-expected.txt: Added.
* fast/dom/Window/postMessage-clone-port-error.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160309 268f45cc-cd09-0410-ab3c-d52691b4dbfc