<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[179007] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/179007">179007</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-01-23 06:30:21 -0800 (Fri, 23 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[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 &quot;%2E&quot;.

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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfgobjectGRefPtrcpp">trunk/Source/WTF/wtf/gobject/GRefPtr.cpp</a></li>
<li><a href="#trunkSourceWTFwtfgobjectGRefPtrh">trunk/Source/WTF/wtf/gobject/GRefPtr.h</a></li>
<li><a href="#trunkSourceWTFwtfgobjectGTypedefsh">trunk/Source/WTF/wtf/gobject/GTypedefs.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformsqlSQLiteFileSystemcpp">trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp</a></li>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp">trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectioncpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedProcessExecutablePathh">trunk/Source/WebKit2/Shared/ProcessExecutablePath.h</a></li>
<li><a href="#trunkSourceWebKit2SharedgtkProcessExecutablePathGtkcpp">trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp">trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp">trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourcecmakeOptionsGTKcmake">trunk/Source/cmake/OptionsGTK.cmake</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/Source/WebKit2/DatabaseProcess/EntryPoint/unix/</li>
<li><a href="#trunkSourceWebKit2DatabaseProcessEntryPointunixDatabaseProcessMaincpp">trunk/Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp</a></li>
<li>trunk/Source/WebKit2/DatabaseProcess/gtk/</li>
<li><a href="#trunkSourceWebKit2DatabaseProcessgtkDatabaseProcessMainGtkcpp">trunk/Source/WebKit2/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp</a></li>
<li>trunk/Source/WebKit2/DatabaseProcess/unix/</li>
<li><a href="#trunkSourceWebKit2DatabaseProcessunixDatabaseProcessMainUnixh">trunk/Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h</a></li>
<li><a href="#trunkSourceWebKit2SharedgtkKeyedDecodercpp">trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedgtkKeyedDecoderh">trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.h</a></li>
<li><a href="#trunkSourceWebKit2SharedgtkKeyedEncodercpp">trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedgtkKeyedEncoderh">trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.h</a></li>
<li>trunk/Source/WebKit2/UIProcess/Databases/gtk/</li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesgtkDatabaseProcessProxyGtkcpp">trunk/Source/WebKit2/UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/ChangeLog        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-01-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [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.
+
</ins><span class="cx"> 2015-01-22  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a build flag for ES6 class syntax
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WTF/ChangeLog        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-01-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Add initial database process support
+        https://bugs.webkit.org/show_bug.cgi?id=139491
+
+        Reviewed by Sergio Villar Senin.
+
+        Add support for using GRefPtr with GVariantBuilder.
+
+        * wtf/gobject/GRefPtr.cpp:
+        (WTF::refGPtr):
+        (WTF::derefGPtr):
+        * wtf/gobject/GRefPtr.h:
+        * wtf/gobject/GTypedefs.h:
+
</ins><span class="cx"> 2015-01-22  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a build flag for ES6 class syntax
</span></span></pre></div>
<a id="trunkSourceWTFwtfgobjectGRefPtrcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/gobject/GRefPtr.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/gobject/GRefPtr.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WTF/wtf/gobject/GRefPtr.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -89,6 +89,19 @@
</span><span class="cx">     g_variant_unref(ptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template &lt;&gt; GVariantBuilder* refGPtr(GVariantBuilder* ptr)
+{
+    if (ptr)
+        g_variant_builder_ref(ptr);
+    return ptr;
+}
+
+template &lt;&gt; void derefGPtr(GVariantBuilder* ptr)
+{
+    if (ptr)
+        g_variant_builder_unref(ptr);
+}
+
</ins><span class="cx"> template &lt;&gt; GSource* refGPtr(GSource* ptr)
</span><span class="cx"> {
</span><span class="cx">     if (ptr)
</span></span></pre></div>
<a id="trunkSourceWTFwtfgobjectGRefPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/gobject/GRefPtr.h (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/gobject/GRefPtr.h        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WTF/wtf/gobject/GRefPtr.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -225,6 +225,8 @@
</span><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE void derefGPtr(GMainLoop* ptr);
</span><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE GVariant* refGPtr(GVariant* ptr);
</span><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE void derefGPtr(GVariant* ptr);
</span><ins>+template &lt;&gt; WTF_EXPORT_PRIVATE GVariantBuilder* refGPtr(GVariantBuilder* ptr);
+template &lt;&gt; WTF_EXPORT_PRIVATE void derefGPtr(GVariantBuilder* ptr);
</ins><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE GSource* refGPtr(GSource* ptr);
</span><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE void derefGPtr(GSource* ptr);
</span><span class="cx"> template &lt;&gt; WTF_EXPORT_PRIVATE GPtrArray* refGPtr(GPtrArray*);
</span></span></pre></div>
<a id="trunkSourceWTFwtfgobjectGTypedefsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/gobject/GTypedefs.h (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/gobject/GTypedefs.h        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WTF/wtf/gobject/GTypedefs.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> typedef struct _GSocketConnection GSocketConnection;
</span><span class="cx"> typedef struct _GSource GSource;
</span><span class="cx"> typedef struct _GVariant GVariant;
</span><ins>+typedef struct _GVariantBuilder GVariantBuilder;
</ins><span class="cx"> typedef union _GdkEvent GdkEvent;
</span><span class="cx"> typedef struct _GTimer GTimer;
</span><span class="cx"> typedef struct _GKeyFile GKeyFile;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebCore/ChangeLog        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-01-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Add initial database process support
+        https://bugs.webkit.org/show_bug.cgi?id=139491
+
+        Reviewed by Sergio Villar Senin.
+
+        * platform/sql/SQLiteFileSystem.cpp:
+        (WebCore::SQLiteFileSystem::openDatabase): Use
+        WebCore::fileSystemRepresentation() for the database filename,
+        otherwise sqlite3_open() fails when the filename contains &quot;%2E&quot;.
+
</ins><span class="cx"> 2015-01-23  Byeongha Cho  &lt;byeongha.cho@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Initialization for some member variable of FontPlatformData
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformsqlSQLiteFileSystemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> int SQLiteFileSystem::openDatabase(const String&amp; filename, sqlite3** database, bool)
</span><span class="cx"> {
</span><del>-    return sqlite3_open(filename.utf8().data(), database);
</del><ins>+    return sqlite3_open(fileSystemRepresentation(filename).data(), database);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String SQLiteFileSystem::getFileNameForNewDatabase(const String&amp; dbDir, const String&amp;,
</span></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/CMakeLists.txt        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1,6 +1,9 @@
</span><span class="cx"> set(WebKit2_INCLUDE_DIRECTORIES
</span><span class="cx">     &quot;${JAVASCRIPTCORE_DIR}/llint&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}&quot;
</span><ins>+    &quot;${WEBKIT2_DIR}/DatabaseProcess&quot;
+    &quot;${WEBKIT2_DIR}/DatabaseProcess/IndexedDB&quot;
+    &quot;${WEBKIT2_DIR}/DatabaseProcess/IndexedDB/sqlite&quot;
</ins><span class="cx">     &quot;${WEBKIT2_DIR}/NetworkProcess&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/NetworkProcess/FileAPI&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/NetworkProcess/cache&quot;
</span><span class="lines">@@ -12,6 +15,7 @@
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/API/c&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/Authentication&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/CoreIPCSupport&quot;
</span><ins>+    &quot;${WEBKIT2_DIR}/Shared/Databases&quot;
</ins><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/Databases/IndexedDB&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/Downloads&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/FileAPI&quot;
</span><span class="lines">@@ -26,6 +30,7 @@
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/API/C&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/API/cpp&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/Authentication&quot;
</span><ins>+    &quot;${WEBKIT2_DIR}/UIProcess/Databases&quot;
</ins><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/Downloads&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/InspectorServer&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/Launcher&quot;
</span><span class="lines">@@ -149,6 +154,16 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> set(WebKit2_SOURCES
</span><ins>+    DatabaseProcess/DatabaseToWebProcessConnection.cpp
+    DatabaseProcess/DatabaseProcess.cpp
+    DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
+    DatabaseProcess/IndexedDB/IDBSerialization.cpp
+    DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
+    DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp
+    DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp
+    DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp
+    DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp
+
</ins><span class="cx">     NetworkProcess/NetworkConnectionToWebProcess.cpp
</span><span class="cx">     NetworkProcess/NetworkProcess.cpp
</span><span class="cx">     NetworkProcess/NetworkProcessPlatformStrategies.cpp
</span><span class="lines">@@ -197,6 +212,7 @@
</span><span class="cx">     Shared/API/APIURLResponse.cpp
</span><span class="cx"> 
</span><span class="cx">     Shared/ActivityAssertion.cpp
</span><ins>+    Shared/AsyncRequest.cpp
</ins><span class="cx">     Shared/BlobDataFileReferenceWithSandboxExtension.cpp
</span><span class="cx">     Shared/CacheModel.cpp
</span><span class="cx">     Shared/ChildProcess.cpp
</span><span class="lines">@@ -227,6 +243,7 @@
</span><span class="cx">     Shared/WebContextMenuItem.cpp
</span><span class="cx">     Shared/WebContextMenuItemData.cpp
</span><span class="cx">     Shared/WebCoreArgumentCoders.cpp
</span><ins>+    Shared/WebCrossThreadCopier.cpp
</ins><span class="cx">     Shared/WebEvent.cpp
</span><span class="cx">     Shared/WebEventConversion.cpp
</span><span class="cx">     Shared/WebGeolocationPosition.cpp
</span><span class="lines">@@ -276,6 +293,9 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/Authentication/AuthenticationManager.cpp
</span><span class="cx"> 
</span><ins>+    Shared/Databases/DatabaseProcessCreationParameters.cpp
+    Shared/Databases/IndexedDB/IDBUtilities.cpp
+
</ins><span class="cx">     Shared/Downloads/Download.cpp
</span><span class="cx">     Shared/Downloads/DownloadAuthenticationClient.cpp
</span><span class="cx">     Shared/Downloads/DownloadManager.cpp
</span><span class="lines">@@ -416,6 +436,8 @@
</span><span class="cx">     UIProcess/Authentication/WebCredential.cpp
</span><span class="cx">     UIProcess/Authentication/WebProtectionSpace.cpp
</span><span class="cx"> 
</span><ins>+    UIProcess/Databases/DatabaseProcessProxy.cpp
+
</ins><span class="cx">     UIProcess/Downloads/DownloadProxy.cpp
</span><span class="cx">     UIProcess/Downloads/DownloadProxyMap.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -459,6 +481,8 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Databases/WebDatabaseProvider.cpp
</span><span class="cx">     WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
</span><ins>+    WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp
+    WebProcess/Databases/WebToDatabaseProcessConnection.cpp
</ins><span class="cx"> 
</span><span class="cx">     WebProcess/FileAPI/BlobRegistryProxy.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -586,6 +610,10 @@
</span><span class="cx"> )
</span><span class="cx"> 
</span><span class="cx"> set(WebKit2_MESSAGES_IN_FILES
</span><ins>+    DatabaseProcess/DatabaseToWebProcessConnection.messages.in
+    DatabaseProcess/DatabaseProcess.messages.in
+    DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in
+
</ins><span class="cx">     NetworkProcess/NetworkConnectionToWebProcess.messages.in
</span><span class="cx">     NetworkProcess/NetworkProcess.messages.in
</span><span class="cx">     NetworkProcess/NetworkResourceLoader.messages.in
</span><span class="lines">@@ -621,6 +649,8 @@
</span><span class="cx">     UIProcess/WebResourceCacheManagerProxy.messages.in
</span><span class="cx">     UIProcess/WebVibrationProxy.messages.in
</span><span class="cx"> 
</span><ins>+    UIProcess/Databases/DatabaseProcessProxy.messages.in
+
</ins><span class="cx">     UIProcess/Downloads/DownloadProxy.messages.in
</span><span class="cx"> 
</span><span class="cx">     UIProcess/Network/NetworkProcessProxy.messages.in
</span><span class="lines">@@ -641,6 +671,8 @@
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Cookies/WebCookieManager.messages.in
</span><span class="cx"> 
</span><ins>+    WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in
+
</ins><span class="cx">     WebProcess/FullScreen/WebFullScreenManager.messages.in
</span><span class="cx"> 
</span><span class="cx">     WebProcess/Geolocation/WebGeolocationManager.messages.in
</span><span class="lines">@@ -685,6 +717,10 @@
</span><span class="cx">     WebKit2
</span><span class="cx"> )
</span><span class="cx"> 
</span><ins>+set(DatabaseProcess_LIBRARIES
+  WebKit2
+)
+
</ins><span class="cx"> set(WebKit2_LIBRARIES
</span><span class="cx">     JavaScriptCore
</span><span class="cx">     WebCore
</span><span class="lines">@@ -767,6 +803,19 @@
</span><span class="cx">     endif ()
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><ins>+if (ENABLE_DATABASE_PROCESS)
+    add_definitions(-DENABLE_DATABASE_PROCESS=1)
+    add_executable(DatabaseProcess ${DatabaseProcess_SOURCES})
+    add_webkit2_prefix_header(DatabaseProcess)
+    target_link_libraries(DatabaseProcess ${DatabaseProcess_LIBRARIES})
+    set_target_properties(DatabaseProcess PROPERTIES FOLDER &quot;WebKit&quot;)
+    install(TARGETS DatabaseProcess DESTINATION &quot;${LIBEXEC_INSTALL_DIR}&quot;)
+
+    if (WebKit2_DatabaseProcess_OUTPUT_NAME)
+        set_target_properties(DatabaseProcess PROPERTIES OUTPUT_NAME ${WebKit2_DatabaseProcess_OUTPUT_NAME})
+    endif ()
+endif ()
+
</ins><span class="cx"> POPULATE_LIBRARY_VERSION(WEBKIT2)
</span><span class="cx"> set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/ChangeLog        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1,3 +1,76 @@
</span><ins>+2015-01-23  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK] Add initial database process support
+        https://bugs.webkit.org/show_bug.cgi?id=139491
+
+        Reviewed by Sergio Villar Senin.
+
+        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.
+
</ins><span class="cx"> 2015-01-22  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS][WK2] Ignore synthetic click initiated on a previous page
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessDatabaseProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include &quot;WebOriginDataManagerMessages.h&quot;
</span><span class="cx"> #include &quot;WebOriginDataManagerProxyMessages.h&quot;
</span><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><ins>+#include &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> #include &lt;WebCore/TextEncoding.h&gt;
</span><span class="cx"> #include &lt;wtf/MainThread.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -188,6 +189,10 @@
</span><span class="cx"> 
</span><span class="cx">     IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND);
</span><span class="cx">     parentProcessConnection()-&gt;send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(clientPort), 0);
</span><ins>+#elif USE(UNIX_DOMAIN_SOCKETS)
+    IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection();
+    m_databaseToWebProcessConnections.append(DatabaseToWebProcessConnection::create(socketPair.server));
+    parentProcessConnection()-&gt;send(Messages::DatabaseProcessProxy::DidCreateDatabaseToWebProcessConnection(IPC::Attachment(socketPair.client)), 0);
</ins><span class="cx"> #else
</span><span class="cx">     notImplemented();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessEntryPointunixDatabaseProcessMaincpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp                                (rev 0)
+++ trunk/Source/WebKit2/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;DatabaseProcessMainUnix.h&quot;
+
+using namespace WebKit;
+
+int main(int argc, char** argv)
+{
+    return DatabaseProcessMainUnix(argc, argv);
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBDatabaseProcessIDBConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -37,6 +37,8 @@
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="cx"> #include &quot;WebIDBServerConnectionMessages.h&quot;
</span><span class="cx"> #include &lt;WebCore/IDBDatabaseMetadata.h&gt;
</span><ins>+#include &lt;WebCore/IDBIndexMetadata.h&gt;
+#include &lt;WebCore/IDBObjectStoreMetadata.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IDBServerConnection.h&gt;
</span><span class="cx"> #include &lt;WebCore/IndexedDB.h&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessgtkDatabaseProcessMainGtkcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp                                (rev 0)
+++ trunk/Source/WebKit2/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;DatabaseProcessMainUnix.h&quot;
+
+#if ENABLE(DATABASE_PROCESS)
+
+#include &quot;ChildProcessMain.h&quot;
+#include &quot;DatabaseProcess.h&quot;
+#include &lt;gtk/gtk.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class DatabaseProcessMain final: public ChildProcessMainBase {
+public:
+    bool platformInitialize() override
+    {
+        gtk_init(nullptr, nullptr);
+        return true;
+    }
+};
+
+int DatabaseProcessMainUnix(int argc, char** argv)
+{
+    return ChildProcessMain&lt;DatabaseProcess, DatabaseProcessMain&gt;(argc, argv);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(DATABASE_PROCESS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessunixDatabaseProcessMainUnixh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h                                (rev 0)
+++ trunk/Source/WebKit2/DatabaseProcess/unix/DatabaseProcessMainUnix.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DatabaseProcessMainUnix_h
+#define DatabaseProcessMainUnix_h
+
+#if ENABLE(DATABASE_PROCESS)
+
+#include &lt;WebKit/WKBase.h&gt;
+
+namespace WebKit {
+
+extern &quot;C&quot; {
+WK_EXPORT int DatabaseProcessMainUnix(int argc, char** argv);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(DATABASE_PROCESS)
+
+#endif // DatabaseProcessMainUnix_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -15,6 +15,8 @@
</span><span class="cx"> set(WebKit2_USE_PREFIX_HEADER ON)
</span><span class="cx"> 
</span><span class="cx"> list(APPEND WebKit2_SOURCES
</span><ins>+    DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp
+
</ins><span class="cx">     NetworkProcess/cache/NetworkCacheStorageSoup.cpp
</span><span class="cx"> 
</span><span class="cx">     NetworkProcess/gtk/NetworkProcessMainGtk.cpp
</span><span class="lines">@@ -50,6 +52,8 @@
</span><span class="cx">     Shared/cairo/ShareableBitmapCairo.cpp
</span><span class="cx"> 
</span><span class="cx">     Shared/gtk/ArgumentCodersGtk.cpp
</span><ins>+    Shared/gtk/KeyedEncoder.cpp
+    Shared/gtk/KeyedDecoder.cpp
</ins><span class="cx">     Shared/gtk/NativeWebKeyboardEventGtk.cpp
</span><span class="cx">     Shared/gtk/NativeWebMouseEventGtk.cpp
</span><span class="cx">     Shared/gtk/NativeWebTouchEventGtk.cpp
</span><span class="lines">@@ -72,6 +76,8 @@
</span><span class="cx"> 
</span><span class="cx">     Shared/unix/ChildProcessMain.cpp
</span><span class="cx"> 
</span><ins>+    UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp
+
</ins><span class="cx">     UIProcess/DefaultUndoController.cpp
</span><span class="cx">     UIProcess/DrawingAreaProxyImpl.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -431,6 +437,7 @@
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/graphics/opentype&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/network/soup&quot;
</span><span class="cx">     &quot;${WEBCORE_DIR}/platform/text/enchant&quot;
</span><ins>+    &quot;${WEBKIT2_DIR}/DatabaseProcess/unix&quot;
</ins><span class="cx">     &quot;${WEBKIT2_DIR}/NetworkProcess/gtk&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/NetworkProcess/unix&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/API/c/gtk&quot;
</span><span class="lines">@@ -488,6 +495,10 @@
</span><span class="cx">     NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
</span><span class="cx"> )
</span><span class="cx"> 
</span><ins>+list(APPEND DatabaseProcess_SOURCES
+    DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp
+)
+
</ins><span class="cx"> file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
</span><span class="cx">      &quot;#include &lt;atomic&gt;\n&quot;
</span><span class="cx">      &quot;int main() { std::atomic&lt;int64_t&gt; i(0); i++; return 0; }\n&quot;)
</span><span class="lines">@@ -950,6 +961,7 @@
</span><span class="cx">             ${WebKit2_SOURCES}
</span><span class="cx">             ${WebProcess_SOURCES}
</span><span class="cx">             ${NetworkProcess_SOURCES}
</span><ins>+            ${DatabaseProcess_SOURCES}
</ins><span class="cx">             ${PluginProcessGTK2_SOURCES}
</span><span class="cx">             ${PluginProcess_SOURCES}
</span><span class="cx">             ${WebKit2_HEADERS}
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedProcessExecutablePathh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ProcessExecutablePath.h (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ProcessExecutablePath.h        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/Shared/ProcessExecutablePath.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -35,7 +35,9 @@
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> String executablePathOfNetworkProcess();
</span><span class="cx"> #endif
</span><del>-
</del><ins>+#if ENABLE(DATABASE_PROCESS)
+String executablePathOfDatabaseProcess();
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedgtkKeyedDecodercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.cpp (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;KeyedDecoder.h&quot;
+
+#include &lt;wtf/text/CString.h&gt;
+
+namespace WebKit {
+
+KeyedDecoder::KeyedDecoder(const uint8_t* data, size_t size)
+{
+    GRefPtr&lt;GBytes&gt; bytes = adoptGRef(g_bytes_new(data, size));
+    GRefPtr&lt;GVariant&gt; variant = g_variant_new_from_bytes(G_VARIANT_TYPE(&quot;a{sv}&quot;), bytes.get(), TRUE);
+    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
+}
+
+KeyedDecoder::~KeyedDecoder()
+{
+    ASSERT(m_dictionaryStack.size() == 1);
+    ASSERT(m_arrayStack.isEmpty());
+    ASSERT(m_arrayIndexStack.isEmpty());
+}
+
+HashMap&lt;String, GRefPtr&lt;GVariant&gt;&gt; KeyedDecoder::dictionaryFromGVariant(GVariant* variant)
+{
+    HashMap&lt;String, GRefPtr&lt;GVariant&gt;&gt; dictionary;
+    GVariantIter iter;
+    g_variant_iter_init(&amp;iter, variant);
+    const char* key;
+    GVariant* value;
+    while (g_variant_iter_loop(&amp;iter, &quot;{&amp;sv}&quot;, &amp;key, &amp;value))
+        dictionary.set(String::fromUTF8(key), value);
+    return WTF::move(dictionary);
+}
+
+bool KeyedDecoder::decodeBytes(const String&amp; key, const uint8_t*&amp; bytes, size_t&amp; size)
+{
+    GRefPtr&lt;GVariant&gt; value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    size = g_variant_get_size(value.get());
+    bytes = static_cast&lt;const uint8_t*&gt;(g_variant_get_data(value.get()));
+    return true;
+}
+
+template&lt;typename T, typename F&gt;
+bool KeyedDecoder::decodeSimpleValue(const String&amp; key, T&amp; result, F getFunction)
+{
+    GRefPtr&lt;GVariant&gt; value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    result = getFunction(value.get());
+    return true;
+}
+
+bool KeyedDecoder::decodeBool(const String&amp; key, bool&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_boolean);
+}
+
+bool KeyedDecoder::decodeUInt32(const String&amp; key, uint32_t&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_uint32);
+}
+
+bool KeyedDecoder::decodeInt32(const String&amp; key, int32_t&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_int32);
+}
+
+bool KeyedDecoder::decodeInt64(const String&amp; key, int64_t&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_int64);
+}
+
+bool KeyedDecoder::decodeFloat(const String&amp; key, float&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_double);
+}
+
+bool KeyedDecoder::decodeDouble(const String&amp; key, double&amp; result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_double);
+}
+
+bool KeyedDecoder::decodeString(const String&amp; key, String&amp; result)
+{
+    GRefPtr&lt;GVariant&gt; value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    result = String::fromUTF8(g_variant_get_string(value.get(), nullptr));
+    return true;
+}
+
+bool KeyedDecoder::beginObject(const String&amp; key)
+{
+    GRefPtr&lt;GVariant&gt; value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    m_dictionaryStack.append(dictionaryFromGVariant(value.get()));
+    return true;
+}
+
+void KeyedDecoder::endObject()
+{
+    m_dictionaryStack.removeLast();
+}
+
+bool KeyedDecoder::beginArray(const String&amp; key)
+{
+    GRefPtr&lt;GVariant&gt; value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    m_arrayStack.append(value.get());
+    m_arrayIndexStack.append(0);
+    return true;
+}
+
+bool KeyedDecoder::beginArrayElement()
+{
+    if (m_arrayIndexStack.last() &gt;= g_variant_n_children(m_arrayStack.last()))
+        return false;
+
+    GRefPtr&lt;GVariant&gt; variant = adoptGRef(g_variant_get_child_value(m_arrayStack.last(), m_arrayIndexStack.last()++));
+    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
+    return true;
+}
+
+void KeyedDecoder::endArrayElement()
+{
+    m_dictionaryStack.removeLast();
+}
+
+void KeyedDecoder::endArray()
+{
+    m_arrayStack.removeLast();
+    m_arrayIndexStack.removeLast();
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedgtkKeyedDecoderh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.h (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/gtk/KeyedDecoder.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igaia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KeyedDecoder_h
+#define KeyedDecoder_h
+
+#include &lt;WebCore/KeyedCoding.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/StringHash.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+class KeyedDecoder final : public WebCore::KeyedDecoder {
+public:
+    KeyedDecoder(const uint8_t* data, size_t);
+    virtual ~KeyedDecoder() override;
+
+private:
+    virtual bool decodeBytes(const String&amp; key, const uint8_t*&amp;, size_t&amp;) override;
+    virtual bool decodeBool(const String&amp; key, bool&amp;) override;
+    virtual bool decodeUInt32(const String&amp; key, uint32_t&amp;) override;
+    virtual bool decodeInt32(const String&amp; key, int32_t&amp;) override;
+    virtual bool decodeInt64(const String&amp; key, int64_t&amp;) override;
+    virtual bool decodeFloat(const String&amp; key, float&amp;) override;
+    virtual bool decodeDouble(const String&amp; key, double&amp;) override;
+    virtual bool decodeString(const String&amp; key, String&amp;) override;
+
+    virtual bool beginObject(const String&amp; key) override;
+    virtual void endObject() override;
+
+    virtual bool beginArray(const String&amp; key) override;
+    virtual bool beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    template&lt;typename T, typename F&gt; bool decodeSimpleValue(const String&amp; key, T&amp; result, F getFunction);
+    HashMap&lt;String, GRefPtr&lt;GVariant&gt;&gt; dictionaryFromGVariant(GVariant*);
+
+    Vector&lt;HashMap&lt;String, GRefPtr&lt;GVariant&gt;&gt;&gt; m_dictionaryStack;
+    Vector&lt;GVariant*, 16&gt; m_arrayStack;
+    Vector&lt;unsigned&gt; m_arrayIndexStack;
+};
+
+} // namespace WebKit
+
+#endif // KeyedDecoder_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedgtkKeyedEncodercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.cpp (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,135 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;KeyedEncoder.h&quot;
+
+#include &lt;WebCore/SharedBuffer.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+
+using namespace WebCore;
+
+namespace WebKit {
+
+KeyedEncoder::KeyedEncoder()
+{
+    g_variant_builder_init(&amp;m_variantBuilder, G_VARIANT_TYPE(&quot;a{sv}&quot;));
+    m_variantBuilderStack.append(&amp;m_variantBuilder);
+}
+
+KeyedEncoder::~KeyedEncoder()
+{
+    ASSERT(m_variantBuilderStack.size() == 1);
+    ASSERT(m_variantBuilderStack.last() == &amp;m_variantBuilder);
+    ASSERT(m_arrayStack.isEmpty());
+    ASSERT(m_objectStack.isEmpty());
+}
+
+void KeyedEncoder::encodeBytes(const String&amp; key, const uint8_t* bytes, size_t size)
+{
+    GRefPtr&lt;GBytes&gt; gBytes = adoptGRef(g_bytes_new_static(bytes, size));
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_from_bytes(G_VARIANT_TYPE(&quot;ay&quot;), gBytes.get(), TRUE));
+}
+
+void KeyedEncoder::encodeBool(const String&amp; key, bool value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_boolean(value));
+}
+
+void KeyedEncoder::encodeUInt32(const String&amp; key, uint32_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_uint32(value));
+}
+
+void KeyedEncoder::encodeInt32(const String&amp; key, int32_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_int32(value));
+}
+
+void KeyedEncoder::encodeInt64(const String&amp; key, int64_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_int64(value));
+}
+
+void KeyedEncoder::encodeFloat(const String&amp; key, float value)
+{
+    encodeDouble(key, value);
+}
+
+void KeyedEncoder::encodeDouble(const String&amp; key, double value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_double(value));
+}
+
+void KeyedEncoder::encodeString(const String&amp; key, const String&amp; value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, key.utf8().data(), g_variant_new_string(value.utf8().data()));
+}
+
+void KeyedEncoder::beginObject(const String&amp; key)
+{
+    GRefPtr&lt;GVariantBuilder&gt; builder = adoptGRef(g_variant_builder_new(G_VARIANT_TYPE(&quot;aa{sv}&quot;)));
+    m_objectStack.append(std::make_pair(key, builder));
+    m_variantBuilderStack.append(builder.get());
+}
+
+void KeyedEncoder::endObject()
+{
+    GVariantBuilder* builder = m_variantBuilderStack.takeLast();
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, m_objectStack.last().first.utf8().data(), g_variant_builder_end(builder));
+    m_objectStack.removeLast();
+}
+
+void KeyedEncoder::beginArray(const String&amp; key)
+{
+    m_arrayStack.append(std::make_pair(key, adoptGRef(g_variant_builder_new(G_VARIANT_TYPE(&quot;aa{sv}&quot;)))));
+}
+
+void KeyedEncoder::beginArrayElement()
+{
+    m_variantBuilderStack.append(g_variant_builder_new(G_VARIANT_TYPE(&quot;a{sv}&quot;)));
+}
+
+void KeyedEncoder::endArrayElement()
+{
+    GRefPtr&lt;GVariantBuilder&gt; variantBuilder = adoptGRef(m_variantBuilderStack.takeLast());
+    g_variant_builder_add_value(m_arrayStack.last().second.get(), g_variant_builder_end(variantBuilder.get()));
+}
+
+void KeyedEncoder::endArray()
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), &quot;{sv}&quot;, m_arrayStack.last().first.utf8().data(), g_variant_builder_end(m_arrayStack.last().second.get()));
+    m_arrayStack.removeLast();
+}
+
+PassRefPtr&lt;SharedBuffer&gt; KeyedEncoder::finishEncoding()
+{
+    g_assert(m_variantBuilderStack.last() == &amp;m_variantBuilder);
+    GRefPtr&lt;GVariant&gt; variant = g_variant_builder_end(&amp;m_variantBuilder);
+    GRefPtr&lt;GBytes&gt; data = g_variant_get_data_as_bytes(variant.get());
+    return SharedBuffer::create(static_cast&lt;const unsigned char*&gt;(g_bytes_get_data(data.get(), nullptr)), static_cast&lt;unsigned&gt;(g_bytes_get_size(data.get())));
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedgtkKeyedEncoderh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.h (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/gtk/KeyedEncoder.h        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef KeyedEncoder_h
+#define KeyedEncoder_h
+
+#include &lt;WebCore/KeyedCoding.h&gt;
+#include &lt;glib.h&gt;
+#include &lt;wtf/Vector.h&gt;
+#include &lt;wtf/gobject/GRefPtr.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+class KeyedEncoder final : public WebCore::KeyedEncoder {
+public:
+    KeyedEncoder();
+    ~KeyedEncoder();
+
+    virtual PassRefPtr&lt;WebCore::SharedBuffer&gt; finishEncoding() override;
+
+private:
+    virtual void encodeBytes(const String&amp; key, const uint8_t*, size_t) override;
+    virtual void encodeBool(const String&amp; key, bool) override;
+    virtual void encodeUInt32(const String&amp; key, uint32_t) override;
+    virtual void encodeInt32(const String&amp; key, int32_t) override;
+    virtual void encodeInt64(const String&amp; key, int64_t) override;
+    virtual void encodeFloat(const String&amp; key, float) override;
+    virtual void encodeDouble(const String&amp; key, double) override;
+    virtual void encodeString(const String&amp; key, const String&amp;) override;
+
+    virtual void beginObject(const String&amp; key) override;
+    virtual void endObject() override;
+
+    virtual void beginArray(const String&amp; key) override;
+    virtual void beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    GVariantBuilder m_variantBuilder;
+    Vector&lt;GVariantBuilder*, 16&gt; m_variantBuilderStack;
+    Vector&lt;std::pair&lt;String, GRefPtr&lt;GVariantBuilder&gt;&gt;, 16&gt; m_arrayStack;
+    Vector&lt;std::pair&lt;String, GRefPtr&lt;GVariantBuilder&gt;&gt;, 16&gt; m_objectStack;
+};
+
+} // namespace WebKit
+
+#endif // KeyedEncoder_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedgtkProcessExecutablePathGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -79,4 +79,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATABASE_PROCESS)
+String executablePathOfDatabaseProcess()
+{
+    return findWebKitProcess(&quot;WebKitDatabaseProcess&quot;);
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;WebOriginDataManagerProxy.h&quot;
</span><span class="cx"> #include &quot;WebOriginDataManagerProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><ins>+#include &lt;WebCore/NotImplemented.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DATABASE_PROCESS)
</span><span class="cx"> 
</span><span class="lines">@@ -117,6 +118,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if OS(DARWIN)
</span><span class="cx">     reply-&gt;send(IPC::Attachment(connectionIdentifier.port(), MACH_MSG_TYPE_MOVE_SEND));
</span><ins>+#elif USE(UNIX_DOMAIN_SOCKETS)
+    reply-&gt;send(connectionIdentifier);
</ins><span class="cx"> #else
</span><span class="cx">     notImplemented();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesgtkDatabaseProcessProxyGtkcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp (0 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Databases/gtk/DatabaseProcessProxyGtk.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -0,0 +1,39 @@
</span><ins>+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;DatabaseProcessProxy.h&quot;
+
+#if ENABLE(DATABASE_PROCESS)
+
+namespace WebKit {
+
+void DatabaseProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&amp;)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(DATABASE_PROCESS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessLaunchergtkProcessLauncherGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -79,6 +79,11 @@
</span><span class="cx">         executablePath = executablePathOfNetworkProcess();
</span><span class="cx">         break;
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(DATABASE_PROCESS)
+    case DatabaseProcess:
+        executablePath = executablePathOfDatabaseProcess();
+        break;
+#endif
</ins><span class="cx">     default:
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -120,8 +120,8 @@
</span><span class="cx"> 
</span><span class="cx"> String WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory()
</span><span class="cx"> {
</span><del>-    notImplemented();
-    return String();
</del><ins>+    GUniquePtr&lt;gchar&gt; indexedDBDatabaseDirectory(g_build_filename(g_get_user_data_dir(), &quot;webkitgtk&quot;, &quot;databases&quot;, &quot;indexeddb&quot;, nullptr));
+    return WebCore::filenameToString(indexedDBDatabaseDirectory.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String WebProcessPool::platformDefaultIconDatabasePath() const
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -1038,11 +1038,13 @@
</span><span class="cx"> 
</span><span class="cx"> #if OS(DARWIN)
</span><span class="cx">     IPC::Connection::Identifier connectionIdentifier(encodedConnectionIdentifier.port());
</span><del>-    if (IPC::Connection::identifierIsNull(connectionIdentifier))
-        return;
</del><ins>+#elif USE(UNIX_DOMAIN_SOCKETS)
+    IPC::Connection::Identifier connectionIdentifier = encodedConnectionIdentifier.releaseFileDescriptor();
</ins><span class="cx"> #else
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="cx"> #endif
</span><ins>+    if (IPC::Connection::identifierIsNull(connectionIdentifier))
+        return;
</ins><span class="cx">     m_webToDatabaseProcessConnection = WebToDatabaseProcessConnection::create(connectionIdentifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcecmakeOptionsGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsGTK.cmake (179006 => 179007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsGTK.cmake        2015-01-23 10:33:33 UTC (rev 179006)
+++ trunk/Source/cmake/OptionsGTK.cmake        2015-01-23 14:30:21 UTC (rev 179007)
</span><span class="lines">@@ -219,6 +219,7 @@
</span><span class="cx"> set(WebKit2_WebProcess_OUTPUT_NAME WebKitWebProcess)
</span><span class="cx"> set(WebKit2_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
</span><span class="cx"> set(WebKit2_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
</span><ins>+set(WebKit2_DatabaseProcess_OUTPUT_NAME WebKitDatabaseProcess)
</ins><span class="cx"> 
</span><span class="cx"> add_definitions(-DBUILDING_GTK__=1)
</span><span class="cx"> add_definitions(-DGETTEXT_PACKAGE=&quot;WebKit2GTK-${WEBKITGTK_API_VERSION}&quot;)
</span></span></pre>
</div>
</div>

</body>
</html>