<!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>[192783] trunk/Source</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/192783">192783</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-11-27 09:50:54 -0800 (Fri, 27 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
https://bugs.webkit.org/show_bug.cgi?id=151627

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (No change in behavior).

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBGetResult.cpp: Added.
(WebCore::IDBGetResult::dataFromBuffer):
(WebCore::IDBGetResult::isolatedCopy):
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
(WebCore::IDBGetResult::valueBuffer):
(WebCore::IDBGetResult::keyData):
(WebCore::IDBGetResult::primaryKeyData):
(WebCore::IDBGetResult::keyPath):
(WebCore::IDBGetResult::setValueBuffer):
(WebCore::IDBGetResult::setKeyData):
(WebCore::IDBGetResult::setPrimaryKeyData):
(WebCore::IDBGetResult::setKeyPath):
(WebCore::IDBGetResult::dataFromBuffer): Deleted.
(WebCore::IDBGetResult::isolatedCopy): Deleted.

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::setGetResult):
* Modules/indexeddb/client/IDBCursorImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):

* Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryCursor.h:

* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::currentData):

* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::currentData):

* platform/CrossThreadCopier.h:

Source/WebKit2:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;IDBGetResult&gt;::encode):
(IPC::ArgumentCoder&lt;IDBGetResult&gt;::decode):
* Shared/WebCoreArgumentCoders.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBGetResulth">trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationscpp">trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryCursorh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIndexCursorcpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreCursorcpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopierh">trunk/Source/WebCore/platform/CrossThreadCopier.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseBackingStoreh">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLitecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionmessagesin">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBGetResultcpp">trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -853,6 +853,7 @@
</span><span class="cx">     Modules/indexeddb/IDBDatabaseMetadata.cpp
</span><span class="cx">     Modules/indexeddb/IDBEventDispatcher.cpp
</span><span class="cx">     Modules/indexeddb/IDBFactory.cpp
</span><ins>+    Modules/indexeddb/IDBGetResult.cpp
</ins><span class="cx">     Modules/indexeddb/IDBIndex.cpp
</span><span class="cx">     Modules/indexeddb/IDBKey.cpp
</span><span class="cx">     Modules/indexeddb/IDBKeyData.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/ChangeLog        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2015-11-27  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
+        https://bugs.webkit.org/show_bug.cgi?id=151627
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests (No change in behavior).
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBGetResult.cpp: Added.
+        (WebCore::IDBGetResult::dataFromBuffer):
+        (WebCore::IDBGetResult::isolatedCopy):
+        * Modules/indexeddb/IDBGetResult.h:
+        (WebCore::IDBGetResult::IDBGetResult):
+        (WebCore::IDBGetResult::valueBuffer):
+        (WebCore::IDBGetResult::keyData):
+        (WebCore::IDBGetResult::primaryKeyData):
+        (WebCore::IDBGetResult::keyPath):
+        (WebCore::IDBGetResult::setValueBuffer):
+        (WebCore::IDBGetResult::setKeyData):
+        (WebCore::IDBGetResult::setPrimaryKeyData):
+        (WebCore::IDBGetResult::setKeyPath):
+        (WebCore::IDBGetResult::dataFromBuffer): Deleted.
+        (WebCore::IDBGetResult::isolatedCopy): Deleted.
+
+        * Modules/indexeddb/client/IDBCursorImpl.cpp:
+        (WebCore::IDBClient::IDBCursor::setGetResult):
+        * Modules/indexeddb/client/IDBCursorImpl.h:
+
+        * Modules/indexeddb/client/IDBTransactionImpl.cpp:
+        (WebCore::IDBClient::IDBTransaction::didGetRecordOnServer):
+
+        * Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp:
+        (WebCore::GetOperation::perform):
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+
+        * Modules/indexeddb/server/MemoryCursor.h:
+
+        * Modules/indexeddb/server/MemoryIndexCursor.cpp:
+        (WebCore::IDBServer::MemoryIndexCursor::currentData):
+
+        * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
+        (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
+
+        * platform/CrossThreadCopier.h:
+
</ins><span class="cx"> 2015-11-27  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Do not use the WebCore garbage collector timer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBGetResultcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.cpp (0 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.cpp                                (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * 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;IDBGetResult.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+void IDBGetResult::dataFromBuffer(SharedBuffer&amp; buffer)
+{
+    Vector&lt;uint8_t&gt; data(buffer.size());
+    memcpy(data.data(), buffer.data(), buffer.size());
+
+    m_valueBuffer = ThreadSafeDataBuffer::adoptVector(data);
+}
+
+IDBGetResult IDBGetResult::isolatedCopy() const
+{
+    IDBGetResult result;
+    result.m_valueBuffer = m_valueBuffer;
+    result.m_keyData = m_keyData.isolatedCopy();
+    result.m_primaryKeyData = m_primaryKeyData.isolatedCopy();
+    result.m_keyPath = m_keyPath.isolatedCopy();
+    return result;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBGetResulth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -36,7 +36,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-struct IDBGetResult {
</del><ins>+class IDBGetResult {
+public:
</ins><span class="cx">     IDBGetResult()
</span><span class="cx">     {
</span><span class="cx">     }
</span><span class="lines">@@ -48,50 +49,63 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult(const ThreadSafeDataBuffer&amp; buffer)
</span><del>-        : valueBuffer(buffer)
</del><ins>+        : m_valueBuffer(buffer)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult(PassRefPtr&lt;IDBKey&gt; key)
</span><del>-        : keyData(key.get())
</del><ins>+        : m_keyData(key.get())
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult(const IDBKeyData&amp; keyData)
</span><del>-        : keyData(keyData)
</del><ins>+        : m_keyData(keyData)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IDBGetResult(PassRefPtr&lt;SharedBuffer&gt; buffer, PassRefPtr&lt;IDBKey&gt; key, const IDBKeyPath&amp; path)
</span><del>-        : keyData(key.get())
-        , keyPath(path)
</del><ins>+        : m_keyData(key.get())
+        , m_keyPath(path)
</ins><span class="cx">     {
</span><span class="cx">         if (buffer)
</span><span class="cx">             dataFromBuffer(*buffer);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void dataFromBuffer(SharedBuffer&amp; buffer)
</del><ins>+    IDBGetResult(const IDBKeyData&amp; keyData, const IDBKeyData&amp; primaryKeyData)
+        : m_keyData(keyData)
+        , m_primaryKeyData(primaryKeyData)
</ins><span class="cx">     {
</span><del>-        Vector&lt;uint8_t&gt; data(buffer.size());
-        memcpy(data.data(), buffer.data(), buffer.size());
-
-        valueBuffer = ThreadSafeDataBuffer::adoptVector(data);
</del><span class="cx">     }
</span><span class="cx"> 
</span><del>-    IDBGetResult isolatedCopy() const
</del><ins>+    IDBGetResult(const IDBKeyData&amp; keyData, const IDBKeyData&amp; primaryKeyData, const ThreadSafeDataBuffer&amp; valueBuffer)
+        : m_valueBuffer(valueBuffer)
+        , m_keyData(keyData)
+        , m_primaryKeyData(primaryKeyData)
</ins><span class="cx">     {
</span><del>-        IDBGetResult result;
-        result.valueBuffer = valueBuffer;
-        result.keyData = keyData.isolatedCopy();
-        result.primaryKeyData = primaryKeyData.isolatedCopy();
-        result.keyPath = keyPath.isolatedCopy();
-        return result;
</del><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ThreadSafeDataBuffer valueBuffer;
-    IDBKeyData keyData;
-    IDBKeyData primaryKeyData;
-    IDBKeyPath keyPath;
</del><ins>+    IDBGetResult isolatedCopy() const;
+
+    const ThreadSafeDataBuffer&amp; valueBuffer() const { return m_valueBuffer; }
+    const IDBKeyData&amp; keyData() const { return m_keyData; }
+    const IDBKeyData&amp; primaryKeyData() const { return m_primaryKeyData; }
+    const IDBKeyPath&amp; keyPath() const { return m_keyPath; }
+
+    // FIXME: When removing LegacyIDB, remove these setters.
+    // https://bugs.webkit.org/show_bug.cgi?id=150854
+
+    void setValueBuffer(const ThreadSafeDataBuffer&amp; valueBuffer) { m_valueBuffer = valueBuffer; }
+    void setKeyData(const IDBKeyData&amp; keyData) { m_keyData = keyData; }
+    void setPrimaryKeyData(const IDBKeyData&amp; keyData) { m_primaryKeyData = keyData; }
+    void setKeyPath(const IDBKeyPath&amp; keyPath) { m_keyPath = keyPath; }
+
+private:
+    WEBCORE_EXPORT void dataFromBuffer(SharedBuffer&amp;);
+
+    ThreadSafeDataBuffer m_valueBuffer;
+    IDBKeyData m_keyData;
+    IDBKeyData m_primaryKeyData;
+    IDBKeyPath m_keyPath;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -282,20 +282,20 @@
</span><span class="cx"> 
</span><span class="cx"> void IDBCursor::setGetResult(IDBRequest&amp; request, const IDBGetResult&amp; getResult)
</span><span class="cx"> {
</span><del>-    LOG(IndexedDB, &quot;IDBCursor::setGetResult - current key %s&quot;, getResult.keyData.loggingString().utf8().data());
</del><ins>+    LOG(IndexedDB, &quot;IDBCursor::setGetResult - current key %s&quot;, getResult.keyData().loggingString().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto* context = request.scriptExecutionContext();
</span><span class="cx">     if (!context)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData);
-    m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData);
-    m_currentPrimaryKeyData = getResult.primaryKeyData;
</del><ins>+    m_deprecatedCurrentKey = idbKeyDataToScriptValue(context, getResult.keyData());
+    m_deprecatedCurrentPrimaryKey = idbKeyDataToScriptValue(context, getResult.primaryKeyData());
+    m_currentPrimaryKeyData = getResult.primaryKeyData();
</ins><span class="cx"> 
</span><span class="cx">     if (isKeyCursor())
</span><span class="cx">         m_deprecatedCurrentValue = { };
</span><span class="cx">     else
</span><del>-        m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.valueBuffer);
</del><ins>+        m_deprecatedCurrentValue = deserializeIDBValueData(*context, getResult.valueBuffer());
</ins><span class="cx"> 
</span><span class="cx">     m_gotValue = true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-struct IDBGetResult;
</del><ins>+class IDBGetResult;
</ins><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBTransactionImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -602,13 +602,13 @@
</span><span class="cx">     const IDBGetResult&amp; result = resultData.getResult();
</span><span class="cx"> 
</span><span class="cx">     if (request.sourceIndexIdentifier() &amp;&amp; request.requestedIndexRecordType() == IndexedDB::IndexRecordType::Key) {
</span><del>-        if (!result.keyData.isNull())
-            request.setResult(&amp;result.keyData);
</del><ins>+        if (!result.keyData().isNull())
+            request.setResult(&amp;result.keyData());
</ins><span class="cx">         else
</span><span class="cx">             request.setResultToUndefined();
</span><span class="cx">     } else {
</span><del>-        if (resultData.getResult().valueBuffer.data())
-            request.setResultToStructuredClone(resultData.getResult().valueBuffer);
</del><ins>+        if (resultData.getResult().valueBuffer().data())
+            request.setResultToStructuredClone(resultData.getResult().valueBuffer());
</ins><span class="cx">         else
</span><span class="cx">             request.setResultToUndefined();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddblegacyIDBTransactionBackendOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/legacy/IDBTransactionBackendOperations.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -100,15 +100,15 @@
</span><span class="cx">         if (error)
</span><span class="cx">             m_callbacks-&gt;onError(error);
</span><span class="cx">         else {
</span><del>-            if (!result.valueBuffer.data()) {
-                if (result.keyData.isNull())
</del><ins>+            if (!result.valueBuffer().data()) {
+                if (result.keyData().isNull())
</ins><span class="cx">                     m_callbacks-&gt;onSuccess();
</span><span class="cx">                 else
</span><del>-                    m_callbacks-&gt;onSuccess(result.keyData.maybeCreateIDBKey());
</del><ins>+                    m_callbacks-&gt;onSuccess(result.keyData().maybeCreateIDBKey());
</ins><span class="cx">             } else {
</span><del>-                auto valueBuffer = SharedBuffer::create(result.valueBuffer.data()-&gt;data(), result.valueBuffer.data()-&gt;size());
-                if (!result.keyData.isNull())
-                    m_callbacks-&gt;onSuccess(valueBuffer, result.keyData.maybeCreateIDBKey(), result.keyPath);
</del><ins>+                auto valueBuffer = SharedBuffer::create(result.valueBuffer().data()-&gt;data(), result.valueBuffer().data()-&gt;size());
+                if (!result.keyData().isNull())
+                    m_callbacks-&gt;onSuccess(valueBuffer, result.keyData().maybeCreateIDBKey(), result.keyPath());
</ins><span class="cx">                 else
</span><span class="cx">                     m_callbacks-&gt;onSuccess(valueBuffer);
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class IDBCursorInfo;
</span><ins>+class IDBGetResult;
</ins><span class="cx"> class IDBIndexInfo;
</span><span class="cx"> class IDBKeyData;
</span><span class="cx"> class IDBObjectStoreInfo;
</span><span class="lines">@@ -41,7 +42,6 @@
</span><span class="cx"> class IDBTransactionInfo;
</span><span class="cx"> class ThreadSafeDataBuffer;
</span><span class="cx"> 
</span><del>-struct IDBGetResult;
</del><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> 
</span><span class="cx"> namespace IndexedDB {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryCursor.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryCursor.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryCursor.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -32,11 +32,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class IDBGetResult;
</ins><span class="cx"> class IDBKeyData;
</span><span class="cx"> class IDBResourceIdentifier;
</span><span class="cx"> 
</span><del>-struct IDBGetResult;
-
</del><span class="cx"> namespace IDBServer {
</span><span class="cx"> 
</span><span class="cx"> class MemoryCursor {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIndexCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIndexCursor.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -65,12 +65,10 @@
</span><span class="cx"> 
</span><span class="cx"> void MemoryIndexCursor::currentData(IDBGetResult&amp; getResult)
</span><span class="cx"> {
</span><del>-    getResult.keyData = m_currentKey;
-    getResult.primaryKeyData = m_currentPrimaryKey;
</del><span class="cx">     if (m_info.cursorType() == IndexedDB::CursorType::KeyOnly)
</span><del>-        return;
-
-    getResult.valueBuffer = m_index.objectStore().valueForKey(m_currentPrimaryKey);
</del><ins>+        getResult = { m_currentKey, m_currentPrimaryKey };
+    else
+        getResult = { m_currentKey, m_currentPrimaryKey, m_index.objectStore().valueForKey(m_currentPrimaryKey) };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MemoryIndexCursor::iterate(const IDBKeyData&amp; key, uint32_t count, IDBGetResult&amp; getResult)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -174,9 +174,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_currentPositionKey = **m_forwardIterator;
</span><del>-        data.keyData = **m_forwardIterator;
-        data.primaryKeyData = **m_forwardIterator;
-        data.valueBuffer = m_objectStore.valueForKeyRange(**m_forwardIterator);
</del><ins>+        data = { **m_forwardIterator, **m_forwardIterator, m_objectStore.valueForKeyRange(**m_forwardIterator) };
</ins><span class="cx">     } else {
</span><span class="cx">         if (!m_reverseIterator || *m_reverseIterator == set-&gt;rend()) {
</span><span class="cx">             data = { };
</span><span class="lines">@@ -184,9 +182,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_currentPositionKey = **m_reverseIterator;
</span><del>-        data.keyData = **m_reverseIterator;
-        data.primaryKeyData = **m_reverseIterator;
-        data.valueBuffer = m_objectStore.valueForKeyRange(**m_reverseIterator);
</del><ins>+        data = { **m_reverseIterator, **m_reverseIterator, m_objectStore.valueForKeyRange(**m_reverseIterator) };
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -1963,6 +1963,7 @@
</span><span class="cx">                 512DD8FB0D91E6AF000F89EE /* ArchiveResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512DD8F10D91E6AF000F89EE /* ArchiveResource.cpp */; };
</span><span class="cx">                 512DD8FC0D91E6AF000F89EE /* ArchiveResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F20D91E6AF000F89EE /* ArchiveResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 512DD8FD0D91E6AF000F89EE /* ArchiveFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */; };
</span><ins>+                512F1A781C07EB6600908239 /* IDBGetResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512F1A771C07EA0D00908239 /* IDBGetResult.cpp */; };
</ins><span class="cx">                 51327D6011A33A2B004F9D65 /* SinkDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 51327D5E11A33A2B004F9D65 /* SinkDocument.h */; };
</span><span class="cx">                 51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */; };
</span><span class="cx">                 513F14530AB634C400094DDF /* IconLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 513F14510AB634C400094DDF /* IconLoader.cpp */; };
</span><span class="lines">@@ -9409,6 +9410,7 @@
</span><span class="cx">                 512DD8F20D91E6AF000F89EE /* ArchiveResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveResource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512DD8F30D91E6AF000F89EE /* ArchiveFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512EA9BD18202857001D01E0 /* IDBOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBOperation.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                512F1A771C07EA0D00908239 /* IDBGetResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBGetResult.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 51327D5E11A33A2B004F9D65 /* SinkDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinkDocument.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 51327D5F11A33A2B004F9D65 /* SinkDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SinkDocument.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 513F14510AB634C400094DDF /* IconLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IconLoader.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19299,6 +19301,7 @@
</span><span class="cx">                                 51645B461B9F889B00F789CE /* IDBFactory.cpp */,
</span><span class="cx">                                 51645B471B9F889B00F789CE /* IDBFactory.h */,
</span><span class="cx">                                 51D7198A181106DF0016DC51 /* IDBFactory.idl */,
</span><ins>+                                512F1A771C07EA0D00908239 /* IDBGetResult.cpp */,
</ins><span class="cx">                                 5123AF1C18918AE40031CDC9 /* IDBGetResult.h */,
</span><span class="cx">                                 51645B481B9F889B00F789CE /* IDBIndex.cpp */,
</span><span class="cx">                                 51645B491B9F889B00F789CE /* IDBIndex.h */,
</span><span class="lines">@@ -30434,6 +30437,7 @@
</span><span class="cx">                                 417253AA1354BBBC00360F2A /* MediaControlElements.cpp in Sources */,
</span><span class="cx">                                 DEBCCDD516646EB200A452E1 /* MediaControlElementTypes.cpp in Sources */,
</span><span class="cx">                                 CD27F6E7145770D30078207D /* MediaController.cpp in Sources */,
</span><ins>+                                512F1A781C07EB6600908239 /* IDBGetResult.cpp in Sources */,
</ins><span class="cx">                                 1F3C3BEA135CAF3C00B8C1AC /* MediaControls.cpp in Sources */,
</span><span class="cx">                                 4157AF8112F1FB0400A8C6F5 /* MediaControlsApple.cpp in Sources */,
</span><span class="cx">                                 CDAB6D2817C7DE6C00C60B34 /* MediaControlsHost.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">         static Type copy(const IDBDatabaseMetadata&amp;);
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    struct IDBGetResult;
</del><ins>+    class IDBGetResult;
</ins><span class="cx">     template&lt;&gt; struct WEBCORE_EXPORT CrossThreadCopierBase&lt;false, false, IDBGetResult&gt; {
</span><span class="cx">         typedef IDBGetResult Type;
</span><span class="cx">         static Type copy(const IDBGetResult&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/ChangeLog        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-11-27  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Class-ify IDBGetResult making it impossible to get the data members wrong.
+        https://bugs.webkit.org/show_bug.cgi?id=151627
+
+        Reviewed by Alexey Proskuryakov.
+
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+        (WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
+        
+        * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
+        
+        * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
+        (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getIndexRecord):
+        
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;IDBGetResult&gt;::encode):
+        (IPC::ArgumentCoder&lt;IDBGetResult&gt;::decode):
+        * Shared/WebCoreArgumentCoders.h:
+        
+        * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
+
</ins><span class="cx"> 2015-11-27  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Remove the remaining uses of GMainLoopSource
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -938,7 +938,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // We must return a key path to know how to inject the result key into the result value object.
</span><del>-    result.keyPath = objectStoreMetadata.keyPath;
</del><ins>+    result.setKeyPath(objectStoreMetadata.keyPath);
</ins><span class="cx"> 
</span><span class="cx">     postMainThreadTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didGetRecordFromBackingStore, requestID, result, 0, String(StringImpl::empty())));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -46,11 +46,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class CrossThreadTask;
</span><ins>+class IDBGetResult;
</ins><span class="cx"> class IDBKeyData;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> 
</span><span class="cx"> struct IDBDatabaseMetadata;
</span><del>-struct IDBGetResult;
</del><span class="cx"> struct IDBKeyRangeData;
</span><span class="cx"> struct SecurityOriginData;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabaseBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -32,13 +32,13 @@
</span><span class="cx"> #include &lt;wtf/RefCounted.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><ins>+class IDBGetResult;
</ins><span class="cx"> class IDBKey;
</span><span class="cx"> class IDBKeyData;
</span><span class="cx"> class IDBKeyRange;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx"> 
</span><span class="cx"> struct IDBDatabaseMetadata;
</span><del>-struct IDBGetResult;
</del><span class="cx"> struct IDBObjectStoreMetadata;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBsqliteUniqueIDBDatabaseBackingStoreSQLitecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -1066,7 +1066,7 @@
</span><span class="cx">         result = IDBGetResult(cursor-&gt;currentPrimaryKey());
</span><span class="cx">     else {
</span><span class="cx">         result = IDBGetResult(SharedBuffer::create(cursor-&gt;currentValueBuffer().data(), cursor-&gt;currentValueBuffer().size()));
</span><del>-        result.keyData = cursor-&gt;currentPrimaryKey();
</del><ins>+        result.setKeyData(cursor-&gt;currentPrimaryKey());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Closing the cursor will destroy the cursor object and remove it from our cursor set.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -1827,13 +1827,13 @@
</span><span class="cx"> 
</span><span class="cx"> void ArgumentCoder&lt;IDBGetResult&gt;::encode(ArgumentEncoder&amp; encoder, const IDBGetResult&amp; result)
</span><span class="cx"> {
</span><del>-    bool nullData = !result.valueBuffer.data();
</del><ins>+    bool nullData = !result.valueBuffer().data();
</ins><span class="cx">     encoder &lt;&lt; nullData;
</span><span class="cx"> 
</span><span class="cx">     if (!nullData)
</span><del>-        encoder &lt;&lt; DataReference(result.valueBuffer.data()-&gt;data(), result.valueBuffer.data()-&gt;size());
</del><ins>+        encoder &lt;&lt; DataReference(result.valueBuffer().data()-&gt;data(), result.valueBuffer().data()-&gt;size());
</ins><span class="cx"> 
</span><del>-    encoder &lt;&lt; result.keyData &lt;&lt; result.keyPath;
</del><ins>+    encoder &lt;&lt; result.keyData() &lt;&lt; result.keyPath();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder&lt;IDBGetResult&gt;::decode(ArgumentDecoder&amp; decoder, IDBGetResult&amp; result)
</span><span class="lines">@@ -1843,7 +1843,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (nullData)
</span><del>-        result.valueBuffer = { };
</del><ins>+        result.setValueBuffer({ });
</ins><span class="cx">     else {
</span><span class="cx">         DataReference data;
</span><span class="cx">         if (!decoder.decode(data))
</span><span class="lines">@@ -1851,15 +1851,21 @@
</span><span class="cx"> 
</span><span class="cx">         Vector&lt;uint8_t&gt; vector(data.size());
</span><span class="cx">         memcpy(vector.data(), data.data(), data.size());
</span><del>-        result.valueBuffer = ThreadSafeDataBuffer::adoptVector(vector);
</del><ins>+        result.setValueBuffer(ThreadSafeDataBuffer::adoptVector(vector));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!decoder.decode(result.keyData))
</del><ins>+    IDBKeyData keyData;
+    if (!decoder.decode(keyData))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (!decoder.decode(result.keyPath))
</del><ins>+    result.setKeyData(keyData);
+
+    IDBKeyPath keyPath;
+    if (!decoder.decode(keyPath))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    result.setKeyPath(keyPath);
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> class FloatSize;
</span><span class="cx"> class FixedPositionViewportConstraints;
</span><span class="cx"> class HTTPHeaderMap;
</span><ins>+class IDBGetResult;
</ins><span class="cx"> class IntPoint;
</span><span class="cx"> class IntRect;
</span><span class="cx"> class IntSize;
</span><span class="lines">@@ -75,7 +76,6 @@
</span><span class="cx"> struct FileChooserSettings;
</span><span class="cx"> struct Length;
</span><span class="cx"> struct GrammarDetail;
</span><del>-struct IDBGetResult;
</del><span class="cx"> struct MimeClassInfo;
</span><span class="cx"> struct PasteboardImage;
</span><span class="cx"> struct PasteboardWebContent;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBServerConnectionmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in (192782 => 192783)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in        2015-11-27 16:54:45 UTC (rev 192782)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in        2015-11-27 17:50:54 UTC (rev 192783)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     DidDeleteIndex(uint64_t requestID, bool success)
</span><span class="cx"> 
</span><span class="cx">     DidPutRecord(uint64_t requestID, WebCore::IDBKeyData resultKey, uint32_t errorCode, String errorMessage)
</span><del>-    DidGetRecord(uint64_t requestID, struct WebCore::IDBGetResult getResult, uint32_t errorCode, String errorMessage)
</del><ins>+    DidGetRecord(uint64_t requestID, WebCore::IDBGetResult getResult, uint32_t errorCode, String errorMessage)
</ins><span class="cx">     DidOpenCursor(uint64_t requestID, int64_t cursorID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
</span><span class="cx">     DidAdvanceCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
</span><span class="cx">     DidIterateCursor(uint64_t requestID, WebCore::IDBKeyData key, WebCore::IDBKeyData primaryKey, IPC::DataReference value, uint32_t errorCode, String errorMessage)
</span></span></pre>
</div>
</div>

</body>
</html>