[GTK] Test /webkit2/WebKitWebContext/languages crashes with network process enabled
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 17:30:21 +0000 (17:30 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2014 17:30:21 +0000 (17:30 +0000)
commit92f272490abe047b1c31f767a77ece45d8980109
treeb42b6007df4bd147aed89e33869be8d28018fc37
parent7281ea7507326b291012a8f625a8fe6515546635
[GTK] Test /webkit2/WebKitWebContext/languages crashes with network process enabled
https://bugs.webkit.org/show_bug.cgi?id=126130

Reviewed by Anders Carlsson.

We need to notify the network process when the user preferred
languages have changed to update the SoupSession accordingly.

* NetworkProcess/NetworkProcess.h: Add
userPreferredLanguagesChanged when using soup network backend.
* NetworkProcess/NetworkProcess.messages.in: Add
UserPreferredLanguagesChanged message when using soup network
backend.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::userPreferredLanguagesChanged): Update
the SoupSession to use the given languages.
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Call
userPreferredLanguagesChanged() when initialization parameters
contain languages.
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
Remove unnedded WebCore prefix.
(WebKit::NetworkProcess::clearCacheForAllOrigins): Simplify using
a single line.
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode): Encode the
languages vector.
(WebKit::NetworkProcessCreationParameters::decode): Decode the
languages vector.
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::languageChanged): Send a message also to the
network process.
* UIProcess/soup/WebContextSoup.cpp:
(WebKit::WebContext::platformInitializeNetworkProcess): Set
languages initial parameter.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkProcess.messages.in
Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp
Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp
Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/soup/WebContextSoup.cpp