[GTK] Add initial database process support
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2015 14:30:21 +0000 (14:30 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jan 2015 14:30:21 +0000 (14:30 +0000)
commit15fccc0756619a5b885a920484bfffddc25c44f1
tree82a92cb892dba55ed41d8ac9df296c775dd94240
parent7c8565784c1e9d39df434ce266f237f4f6f1e529
[GTK] Add initial database process support
https://bugs.webkit.org/show_bug.cgi?id=139491

Reviewed by Sergio Villar Senin.

.:

* Source/cmake/OptionsGTK.cmake: Set WebKit2_DatabaseProcess_OUTPUT_NAME.

Source/WebCore:

* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase): Use
WebCore::fileSystemRepresentation() for the database filename,
otherwise sqlite3_open() fails when the filename contains "%2E".

Source/WebKit2:

Add initial support for DatabaseProcess, disabled by default for
now.

* CMakeLists.txt: Add required files to compilation.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
(main):
* DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
(WebKit::DatabaseProcessMainUnix):
* DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
* PlatformGTK.cmake: Add required files to compilation.
* Shared/ProcessExecutablePath.h:
* Shared/gtk/KeyedDecoder.cpp: Added.
(WebKit::KeyedDecoder::KeyedDecoder):
(WebKit::KeyedDecoder::~KeyedDecoder):
(WebKit::KeyedDecoder::buildDictionaryFromGVariant):
(WebKit::KeyedDecoder::decodeBytes):
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeInt64):
(WebKit::KeyedDecoder::decodeFloat):
(WebKit::KeyedDecoder::decodeDouble):
(WebKit::KeyedDecoder::decodeString):
(WebKit::KeyedDecoder::beginObject):
(WebKit::KeyedDecoder::endObject):
(WebKit::KeyedDecoder::beginArray):
(WebKit::KeyedDecoder::beginArrayElement):
(WebKit::KeyedDecoder::endArrayElement):
(WebKit::KeyedDecoder::endArray):
* Shared/gtk/KeyedDecoder.h: Added.
* Shared/gtk/KeyedEncoder.cpp: Added.
(WebKit::KeyedEncoder::KeyedEncoder):
(WebKit::KeyedEncoder::~KeyedEncoder):
(WebKit::KeyedEncoder::encodeBytes):
(WebKit::KeyedEncoder::encodeBool):
(WebKit::KeyedEncoder::encodeUInt32):
(WebKit::KeyedEncoder::encodeInt32):
(WebKit::KeyedEncoder::encodeInt64):
(WebKit::KeyedEncoder::encodeFloat):
(WebKit::KeyedEncoder::encodeDouble):
(WebKit::KeyedEncoder::encodeString):
(WebKit::KeyedEncoder::beginObject):
(WebKit::KeyedEncoder::endObject):
(WebKit::KeyedEncoder::beginArray):
(WebKit::KeyedEncoder::beginArrayElement):
(WebKit::KeyedEncoder::endArrayElement):
(WebKit::KeyedEncoder::endArray):
(WebKit::KeyedEncoder::finishEncoding):
* Shared/gtk/KeyedEncoder.h: Added.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfDatabaseProcess):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Handle the
DatabaseProcess too.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
the unix domain sockets implementation.

Source/WTF:

Add support for using GRefPtr with GVariantBuilder.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
* wtf/gobject/GTypedefs.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/gobject/GRefPtr.cpp
Source/WTF/wtf/gobject/GRefPtr.h
Source/WTF/wtf/gobject/GTypedefs.h
Source/WebCore/ChangeLog
Source/WebCore/platform/sql/SQLiteFileSystem.cpp
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp [new file with mode: 0644]
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
Source/WebKit2/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp [new file with mode: 0644]
Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h [new file with mode: 0644]
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/Shared/ProcessExecutablePath.h
Source/WebKit2/Shared/gtk/KeyedDecoder.cpp [new file with mode: 0644]
Source/WebKit2/Shared/gtk/KeyedDecoder.h [new file with mode: 0644]
Source/WebKit2/Shared/gtk/KeyedEncoder.cpp [new file with mode: 0644]
Source/WebKit2/Shared/gtk/KeyedEncoder.h [new file with mode: 0644]
Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp
Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp
Source/WebKit2/UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/cmake/OptionsGTK.cmake