<!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>[199882] 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/199882">199882</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-22 11:06:04 -0700 (Fri, 22 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
https://bugs.webkit.org/show_bug.cgi?id=156916

Reviewed by Tim Horton.

Source/WebCore:

No new tests (No behavior change).

* Modules/indexeddb/IDBFactory.cpp: Remove unneeded include.

* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::ref): Ref the ConnectionToServer.
(WebCore::IDBClient::IDBConnectionProxy::deref): Deref it.
(WebCore::IDBClient::IDBConnectionProxy::connectionToServer):
(WebCore::IDBClient::IDBConnectionProxy::openDatabase):
(WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
(WebCore::IDBClient::IDBConnectionProxy::create): Deleted.
* Modules/indexeddb/client/IDBConnectionProxy.h:

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): Create a proxy owned by this.
(WebCore::IDBClient::IDBConnectionToServer::proxy): Expose it.
* Modules/indexeddb/client/IDBConnectionToServer.h:

* dom/Document.cpp:
(WebCore::Document::idbConnectionProxy):

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp">trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/ChangeLog        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2016-04-22  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
+        https://bugs.webkit.org/show_bug.cgi?id=156916
+
+        Reviewed by Tim Horton.
+
+        No new tests (No behavior change).
+
+        * Modules/indexeddb/IDBFactory.cpp: Remove unneeded include.
+        
+        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+        (WebCore::IDBClient::IDBConnectionProxy::ref): Ref the ConnectionToServer.
+        (WebCore::IDBClient::IDBConnectionProxy::deref): Deref it.
+        (WebCore::IDBClient::IDBConnectionProxy::connectionToServer):
+        (WebCore::IDBClient::IDBConnectionProxy::openDatabase):
+        (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
+        (WebCore::IDBClient::IDBConnectionProxy::create): Deleted.
+        * Modules/indexeddb/client/IDBConnectionProxy.h:
+        
+        * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+        (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): Create a proxy owned by this.
+        (WebCore::IDBClient::IDBConnectionToServer::proxy): Expose it.
+        * Modules/indexeddb/client/IDBConnectionToServer.h:
+        
+        * dom/Document.cpp:
+        (WebCore::Document::idbConnectionProxy):
+
+        * WebCore.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-04-22  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r194898): Multi download of external SVG defs file by &lt;use&gt; xlinks:href (caching)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><span class="cx"> #include &quot;IDBBindingUtilities.h&quot;
</span><span class="cx"> #include &quot;IDBConnectionProxy.h&quot;
</span><del>-#include &quot;IDBConnectionToServer.h&quot;
</del><span class="cx"> #include &quot;IDBDatabaseIdentifier.h&quot;
</span><span class="cx"> #include &quot;IDBKey.h&quot;
</span><span class="cx"> #include &quot;IDBOpenDBRequest.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -34,11 +34,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><del>-Ref&lt;IDBConnectionProxy&gt; IDBConnectionProxy::create(IDBConnectionToServer&amp; connection)
-{
-    return adoptRef(*new IDBConnectionProxy(connection));
-}
-
</del><span class="cx"> IDBConnectionProxy::IDBConnectionProxy(IDBConnectionToServer&amp; connection)
</span><span class="cx">     : m_connectionToServer(connection)
</span><span class="cx">     , m_serverConnectionIdentifier(connection.identifier())
</span><span class="lines">@@ -46,13 +41,23 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBConnectionProxy::ref()
+{
+    m_connectionToServer.ref();
+}
+
+void IDBConnectionProxy::deref()
+{
+    m_connectionToServer.deref();
+}
+
</ins><span class="cx"> // FIXME: Temporarily required during bringup of IDB-in-Workers.
</span><span class="cx"> // Once all IDB object reliance on the IDBConnectionToServer has been shifted to reliance on
</span><span class="cx"> // IDBConnectionProxy, remove this.
</span><span class="cx"> IDBConnectionToServer&amp; IDBConnectionProxy::connectionToServer()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><del>-    return m_connectionToServer.get();
</del><ins>+    return m_connectionToServer;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBOpenDBRequest&gt; IDBConnectionProxy::openDatabase(ScriptExecutionContext&amp; context, const IDBDatabaseIdentifier&amp; databaseIdentifier, uint64_t version)
</span><span class="lines">@@ -62,7 +67,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto request = IDBOpenDBRequest::createOpenRequest(context, *this, databaseIdentifier, version);
</span><del>-    m_connectionToServer-&gt;openDatabase(request.get());
</del><ins>+    m_connectionToServer.openDatabase(request.get());
</ins><span class="cx">     return WTFMove(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -73,7 +78,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto request = IDBOpenDBRequest::createDeleteRequest(context, *this, databaseIdentifier);
</span><del>-    m_connectionToServer-&gt;deleteDatabase(request.get());
</del><ins>+    m_connectionToServer.deleteDatabase(request.get());
</ins><span class="cx">     return WTFMove(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;IDBConnectionToServer.h&quot;
</span><ins>+#include &lt;wtf/RefPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -37,9 +38,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IDBClient {
</span><span class="cx"> 
</span><del>-class IDBConnectionProxy : public ThreadSafeRefCounted&lt;IDBConnectionProxy&gt; {
</del><ins>+class IDBConnectionToServer;
+
+class IDBConnectionProxy {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;IDBConnectionProxy&gt; create(IDBConnectionToServer&amp;);
</del><ins>+    IDBConnectionProxy(IDBConnectionToServer&amp;);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; openDatabase(ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;, uint64_t version);
</span><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const IDBDatabaseIdentifier&amp;);
</span><span class="lines">@@ -51,10 +54,11 @@
</span><span class="cx">     // IDBConnectionProxy, remove this.
</span><span class="cx">     IDBConnectionToServer&amp; connectionToServer();
</span><span class="cx"> 
</span><ins>+    void ref();
+    void deref();
+
</ins><span class="cx"> private:
</span><del>-    IDBConnectionProxy(IDBConnectionToServer&amp;);
-
-    Ref&lt;IDBConnectionToServer&gt; m_connectionToServer;
</del><ins>+    IDBConnectionToServer&amp; m_connectionToServer;
</ins><span class="cx">     uint64_t m_serverConnectionIdentifier;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBConnectionProxy.h&quot;
</ins><span class="cx"> #include &quot;IDBDatabase.h&quot;
</span><span class="cx"> #include &quot;IDBKeyRangeData.h&quot;
</span><span class="cx"> #include &quot;IDBOpenDBRequest.h&quot;
</span><span class="lines">@@ -46,6 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> IDBConnectionToServer::IDBConnectionToServer(IDBConnectionToServerDelegate&amp; delegate)
</span><span class="cx">     : m_delegate(delegate)
</span><ins>+    , m_proxy(std::make_unique&lt;IDBConnectionProxy&gt;(*this))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -54,13 +56,19 @@
</span><span class="cx">     return m_delegate-&gt;identifier();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IDBConnectionProxy&amp; IDBConnectionToServer::proxy()
+{
+    ASSERT(m_proxy);
+    return *m_proxy;
+}
+
</ins><span class="cx"> void IDBConnectionToServer::deleteDatabase(IDBOpenDBRequest&amp; request)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBConnectionToServer::deleteDatabase - %s&quot;, request.databaseIdentifier().debugString().utf8().data());
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!m_openDBRequestMap.contains(request.resourceIdentifier()));
</span><span class="cx">     m_openDBRequestMap.set(request.resourceIdentifier(), &amp;request);
</span><del>-    
</del><ins>+
</ins><span class="cx">     IDBRequestData requestData(*this, request);
</span><span class="cx">     m_delegate-&gt;deleteDatabase(requestData);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx"> 
</span><ins>+#include &quot;IDBConnectionProxy.h&quot;
</ins><span class="cx"> #include &quot;IDBConnectionToServerDelegate.h&quot;
</span><span class="cx"> #include &quot;IDBResourceIdentifier.h&quot;
</span><span class="cx"> #include &quot;TransactionOperation.h&quot;
</span><span class="lines">@@ -56,6 +57,8 @@
</span><span class="cx"> 
</span><span class="cx">     uint64_t identifier() const;
</span><span class="cx"> 
</span><ins>+    IDBConnectionProxy&amp; proxy();
+
</ins><span class="cx">     void deleteDatabase(IDBOpenDBRequest&amp;);
</span><span class="cx">     WEBCORE_EXPORT void didDeleteDatabase(const IDBResultData&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -136,6 +139,8 @@
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_committingTransactions;
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;IDBTransaction&gt;&gt; m_abortingTransactions;
</span><span class="cx">     HashMap&lt;IDBResourceIdentifier, RefPtr&lt;TransactionOperation&gt;&gt; m_activeOperations;
</span><ins>+
+    std::unique_ptr&lt;IDBConnectionProxy&gt; m_proxy;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace IDBClient
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -2086,7 +2086,7 @@
</span><span class="cx">                 517A63C51B74318F00E7DCDC /* KeyedDecoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 517A63C61B74319200E7DCDC /* KeyedEncoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C21B74317E00E7DCDC /* KeyedEncoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 517B25A91CC82B2A0061C011 /* IDBConnectionProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517B25A71CC820320061C011 /* IDBConnectionProxy.cpp */; };
</span><del>-                517B25AA1CC82B2A0061C011 /* IDBConnectionProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 517B25A81CC820320061C011 /* IDBConnectionProxy.h */; };
</del><ins>+                517B25AA1CC82B2A0061C011 /* IDBConnectionProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 517B25A81CC820320061C011 /* IDBConnectionProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
</span><span class="cx">                 5185FC741BB4C4E80012898F /* DOMWindowIndexedDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7196C181106DF0016DC51 /* DOMWindowIndexedDatabase.cpp */; };
</span><span class="cx">                 5185FC751BB4C4E80012898F /* DOMWindowIndexedDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7196D181106DF0016DC51 /* DOMWindowIndexedDatabase.h */; };
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -3068,7 +3068,7 @@
</span><span class="cx">         if (!currentPage)
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><del>-        m_idbConnectionProxy = IDBClient::IDBConnectionProxy::create(currentPage-&gt;idbConnection());
</del><ins>+        m_idbConnectionProxy = &amp;currentPage-&gt;idbConnection().proxy();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return m_idbConnectionProxy.get();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-04-22  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
+        https://bugs.webkit.org/show_bug.cgi?id=156916
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
+        (WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
+
</ins><span class="cx"> 2016-04-22  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         NetworkCacheIOChannelSoup: detach the newly-created IOChannel::readSync thread
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessDatabasesIndexedDBWebIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp (199881 => 199882)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-04-22 17:37:09 UTC (rev 199881)
+++ trunk/Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp        2016-04-22 18:06:04 UTC (rev 199882)
</span><span class="lines">@@ -60,9 +60,9 @@
</span><span class="cx"> WebIDBConnectionToServer::WebIDBConnectionToServer()
</span><span class="cx"> {
</span><span class="cx">     relaxAdoptionRequirement();
</span><del>-    m_connectionToServer = IDBClient::IDBConnectionToServer::create(*this);
</del><span class="cx"> 
</span><span class="cx">     m_isOpenInServer = sendSync(Messages::DatabaseToWebProcessConnection::EstablishIDBConnectionToServer(), m_identifier);
</span><ins>+    m_connectionToServer = IDBClient::IDBConnectionToServer::create(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebIDBConnectionToServer::~WebIDBConnectionToServer()
</span></span></pre>
</div>
</div>

</body>
</html>