<!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>[190379] 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/190379">190379</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-09-30 18:04:19 -0700 (Wed, 30 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
https://bugs.webkit.org/show_bug.cgi?id=149678
Reviewed by Alex Christensen.
Source/WebCore:
Test: storage/indexeddb/modern/opendatabase-request-event.html
- UniqueIDBDatabase represents a specific IDB database instance that can have multiple
connections to it.
- IDBBackingStore is an abstract representation of a unique database's backing store,
and has a concrete in-memory implementation for now.
- The database thread exists on IDBServer and is for offloading actual database I/O from
the main thread.
* CMakeLists.txt:
* Modules/indexeddb/IDBDatabaseIdentifier.cpp:
(WebCore::IDBDatabaseIdentifier::isolatedCopy):
* Modules/indexeddb/IDBDatabaseIdentifier.h:
* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::openDatabase):
(WebCore::IDBClient::IDBConnectionToServer::didOpenDatabase):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
* Modules/indexeddb/client/IDBFactoryImpl.cpp:
(WebCore::IDBClient::IDBFactory::openInternal):
* Modules/indexeddb/server/IDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
(WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::openDatabase):
(WebCore::IDBServer::IDBServer::deleteDatabase):
(WebCore::IDBServer::IDBServer::postDatabaseTask):
(WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
(WebCore::IDBServer::IDBServer::databaseThreadEntry):
(WebCore::IDBServer::IDBServer::databaseRunLoop):
(WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/IDBServerOperation.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
(WebCore::IDBServer::IDBServerOperation::create):
(WebCore::IDBServer::IDBServerOperation::IDBServerOperation):
* Modules/indexeddb/server/IDBServerOperation.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
(WebCore::IDBServer::IDBServerOperation::connection):
(WebCore::IDBServer::IDBServerOperation::requestData):
* Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp.
(WebCore::IDBServer::MemoryIDBBackingStore::create):
(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::~MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
* Modules/indexeddb/server/MemoryIDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp: Added.
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
* Modules/indexeddb/server/UniqueIDBDatabase.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
(WebCore::IDBServer::UniqueIDBDatabase::create):
* Modules/indexeddb/shared/IDBDatabaseInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
(WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
(WebCore::IDBDatabaseInfo::isolatedCopy):
* Modules/indexeddb/shared/IDBDatabaseInfo.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
(WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didDeleteDatabase):
(WebCore::InProcessIDBServer::openDatabase):
(WebCore::InProcessIDBServer::didOpenDatabase):
* Modules/indexeddb/shared/InProcessIDBServer.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/CrossThreadCopier.cpp:
(WebCore::IDBDatabaseInfo>::copy):
(WebCore::IDBDatabaseIdentifier>::copy):
* platform/CrossThreadCopier.h:
LayoutTests:
* storage/indexeddb/modern/opendatabase-request-event-expected.txt: Added.
* storage/indexeddb/modern/opendatabase-request-event.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseIdentifiercpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabaseIdentifierh">trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.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="#trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh">trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh">trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh">trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopiercpp">trunk/Source/WebCore/platform/CrossThreadCopier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformCrossThreadCopierh">trunk/Source/WebCore/platform/CrossThreadCopier.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml">trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerOperationcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBServerOperationh">trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh">trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/LayoutTests/ChangeLog        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2015-09-30 Brady Eidson <beidson@apple.com>
+
+ Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
+ https://bugs.webkit.org/show_bug.cgi?id=149678
+
+ Reviewed by Alex Christensen.
+
+ * storage/indexeddb/modern/opendatabase-request-event-expected.txt: Added.
+ * storage/indexeddb/modern/opendatabase-request-event.html: Added.
+
</ins><span class="cx"> 2015-09-30 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash when using an SVG font with > 390 glyphs
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event-expected.txt        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+ALERT: [object IDBOpenDBRequest]
+ALERT: error [object Event]
+ALERT: Done
+This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernopendatabaserequesteventhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html         (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/opendatabase-request-event.html        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+This test calls open on window.indexedDB in various ways, verifying that IDBOpenDBRequest objects are returned when expected and exceptions are thrown when expected.
+<script>
+
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+}
+
+function done()
+{
+ alert("Done");
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+
+var request = window.indexedDB.open("TestDatabase");
+alert(request);
+
+request.onsuccess = function()
+{
+        alert("success");
+        done();
+}
+request.onerror = function(e)
+{
+        alert("error " + e);
+        done();
+}
+</script>
</ins></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -898,7 +898,11 @@
</span><span class="cx">
</span><span class="cx"> Modules/indexeddb/server/IDBConnectionToClient.cpp
</span><span class="cx"> Modules/indexeddb/server/IDBServer.cpp
</span><ins>+ Modules/indexeddb/server/IDBServerOperation.cpp
+ Modules/indexeddb/server/MemoryIDBBackingStore.cpp
+ Modules/indexeddb/server/UniqueIDBDatabase.cpp
</ins><span class="cx">
</span><ins>+ Modules/indexeddb/shared/IDBDatabaseInfo.cpp
</ins><span class="cx"> Modules/indexeddb/shared/IDBError.cpp
</span><span class="cx"> Modules/indexeddb/shared/IDBRequestData.cpp
</span><span class="cx"> Modules/indexeddb/shared/IDBRequestIdentifier.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/ChangeLog        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -1,3 +1,97 @@
</span><ins>+2015-09-30 Brady Eidson <beidson@apple.com>
+
+ Add UniqueIDBDatabase object, IDBBackingStore objects, and a database operation thread.
+ https://bugs.webkit.org/show_bug.cgi?id=149678
+
+ Reviewed by Alex Christensen.
+
+ Test: storage/indexeddb/modern/opendatabase-request-event.html
+
+ - UniqueIDBDatabase represents a specific IDB database instance that can have multiple
+ connections to it.
+ - IDBBackingStore is an abstract representation of a unique database's backing store,
+ and has a concrete in-memory implementation for now.
+ - The database thread exists on IDBServer and is for offloading actual database I/O from
+ the main thread.
+
+ * CMakeLists.txt:
+
+ * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
+ (WebCore::IDBDatabaseIdentifier::isolatedCopy):
+ * Modules/indexeddb/IDBDatabaseIdentifier.h:
+
+ * Modules/indexeddb/client/IDBConnectionToServer.cpp:
+ (WebCore::IDBClient::IDBConnectionToServer::openDatabase):
+ (WebCore::IDBClient::IDBConnectionToServer::didOpenDatabase):
+ * Modules/indexeddb/client/IDBConnectionToServer.h:
+ * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
+
+ * Modules/indexeddb/client/IDBFactoryImpl.cpp:
+ (WebCore::IDBClient::IDBFactory::openInternal):
+
+ * Modules/indexeddb/server/IDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
+ (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
+
+ * Modules/indexeddb/server/IDBConnectionToClient.cpp:
+ (WebCore::IDBServer::IDBConnectionToClient::didOpenDatabase):
+ * Modules/indexeddb/server/IDBConnectionToClient.h:
+ * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
+
+ * Modules/indexeddb/server/IDBServer.cpp:
+ (WebCore::IDBServer::IDBServer::IDBServer):
+ (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
+ (WebCore::IDBServer::IDBServer::createBackingStore):
+ (WebCore::IDBServer::IDBServer::openDatabase):
+ (WebCore::IDBServer::IDBServer::deleteDatabase):
+ (WebCore::IDBServer::IDBServer::postDatabaseTask):
+ (WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
+ (WebCore::IDBServer::IDBServer::databaseThreadEntry):
+ (WebCore::IDBServer::IDBServer::databaseRunLoop):
+ (WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread):
+ * Modules/indexeddb/server/IDBServer.h:
+
+ * Modules/indexeddb/server/IDBServerOperation.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h.
+ (WebCore::IDBServer::IDBServerOperation::create):
+ (WebCore::IDBServer::IDBServerOperation::IDBServerOperation):
+ * Modules/indexeddb/server/IDBServerOperation.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
+ (WebCore::IDBServer::IDBServerOperation::connection):
+ (WebCore::IDBServer::IDBServerOperation::requestData):
+
+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp.
+ (WebCore::IDBServer::MemoryIDBBackingStore::create):
+ (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
+ (WebCore::IDBServer::MemoryIDBBackingStore::~MemoryIDBBackingStore):
+ (WebCore::IDBServer::MemoryIDBBackingStore::getOrEstablishDatabaseInfo):
+ * Modules/indexeddb/server/MemoryIDBBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h.
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Added.
+ (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
+ (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
+ (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
+ (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
+ (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h: Copied from Source/WebCore/Modules/indexeddb/server/IDBServer.h.
+ (WebCore::IDBServer::UniqueIDBDatabase::create):
+
+ * Modules/indexeddb/shared/IDBDatabaseInfo.cpp: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
+ (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
+ (WebCore::IDBDatabaseInfo::isolatedCopy):
+ * Modules/indexeddb/shared/IDBDatabaseInfo.h: Copied from Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h.
+ (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
+
+ * Modules/indexeddb/shared/InProcessIDBServer.cpp:
+ (WebCore::InProcessIDBServer::didDeleteDatabase):
+ (WebCore::InProcessIDBServer::openDatabase):
+ (WebCore::InProcessIDBServer::didOpenDatabase):
+ * Modules/indexeddb/shared/InProcessIDBServer.h:
+
+ * WebCore.xcodeproj/project.pbxproj:
+
+ * platform/CrossThreadCopier.cpp:
+ (WebCore::IDBDatabaseInfo>::copy):
+ (WebCore::IDBDatabaseIdentifier>::copy):
+ * platform/CrossThreadCopier.h:
+
</ins><span class="cx"> 2015-09-30 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> Crash when using an SVG font with > 390 glyphs
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseIdentifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -44,7 +44,17 @@
</span><span class="cx"> ASSERT(!databaseName.isNull());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+IDBDatabaseIdentifier IDBDatabaseIdentifier::isolatedCopy() const
+{
+ IDBDatabaseIdentifier identifier;
</ins><span class="cx">
</span><ins>+ identifier.m_databaseName = m_databaseName.isolatedCopy();
+ identifier.m_openingOrigin = m_openingOrigin.isolatedCopy();
+ identifier.m_mainFrameOrigin = m_mainFrameOrigin.isolatedCopy();
+
+ return WTF::move(identifier);
+}
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> String IDBDatabaseIdentifier::debugString() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabaseIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseIdentifier.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> m_mainFrameOrigin.port = -1;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ IDBDatabaseIdentifier isolatedCopy() const;
+
</ins><span class="cx"> bool isHashTableDeletedValue() const
</span><span class="cx"> {
</span><span class="cx"> return m_openingOrigin.port == -1 && m_mainFrameOrigin.port == -1;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -72,6 +72,27 @@
</span><span class="cx"> request->requestCompleted(resultData);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionToServer::openDatabase(IDBOpenDBRequest& request)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::openDatabase - %s", request.databaseIdentifier().debugString().utf8().data());
+
+ ASSERT(!m_openDBRequestMap.contains(request.requestIdentifier()));
+ m_openDBRequestMap.set(request.requestIdentifier(), &request);
+
+ IDBRequestData requestData(*this, request);
+ m_delegate->openDatabase(requestData);
+}
+
+void IDBConnectionToServer::didOpenDatabase(const IDBResultData& resultData)
+{
+ LOG(IndexedDB, "IDBConnectionToServer::didOpenDatabase");
+
+ auto request = m_openDBRequestMap.take(resultData.requestIdentifier());
+ ASSERT(request);
+
+ request->requestCompleted(resultData);
+}
+
</ins><span class="cx"> } // namespace IDBClient
</span><span class="cx"> } // namespace WebCore
</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 (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -50,7 +50,10 @@
</span><span class="cx">
</span><span class="cx"> void deleteDatabase(IDBOpenDBRequest&);
</span><span class="cx"> void didDeleteDatabase(const IDBResultData&);
</span><del>-
</del><ins>+
+ void openDatabase(IDBOpenDBRequest&);
+ void didOpenDatabase(const IDBResultData&);
+
</ins><span class="cx"> private:
</span><span class="cx"> IDBConnectionToServer(IDBConnectionToServerDelegate&);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -40,7 +40,8 @@
</span><span class="cx">
</span><span class="cx"> virtual uint64_t identifier() const = 0;
</span><span class="cx"> virtual void deleteDatabase(IDBRequestData&) = 0;
</span><del>-
</del><ins>+ virtual void openDatabase(IDBRequestData&) = 0;
+
</ins><span class="cx"> virtual void ref() = 0;
</span><span class="cx"> virtual void deref() = 0;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBFactoryImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBFactoryImpl.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -115,6 +115,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto request = IDBOpenDBRequest::createOpenRequest(m_connectionToServer.get(), context, databaseIdentifier, version);
</span><ins>+ m_connectionToServer->openDatabase(request.get());
+
</ins><span class="cx"> return adoptRef(&request.leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStorehfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,47 @@
</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.
+ */
+
+#ifndef IDBBackingStore_h
+#define IDBBackingStore_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBDatabaseInfo.h"
+
+namespace WebCore {
+namespace IDBServer {
+
+class IDBBackingStore {
+public:
+ virtual ~IDBBackingStore() { }
+
+ virtual const IDBDatabaseInfo& getOrEstablishDatabaseInfo() = 0;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBBackingStore_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -51,6 +51,11 @@
</span><span class="cx"> m_delegate->didDeleteDatabase(result);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBConnectionToClient::didOpenDatabase(const IDBResultData& result)
+{
+ m_delegate->didOpenDatabase(result);
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> uint64_t identifier() const;
</span><span class="cx">
</span><span class="cx"> void didDeleteDatabase(const IDBResultData&);
</span><ins>+ void didOpenDatabase(const IDBResultData&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> IDBConnectionToClient(IDBConnectionToClientDelegate&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> virtual uint64_t identifier() const = 0;
</span><span class="cx">
</span><span class="cx"> virtual void didDeleteDatabase(const IDBResultData&) = 0;
</span><ins>+ virtual void didOpenDatabase(const IDBResultData&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual void ref() = 0;
</span><span class="cx"> virtual void deref() = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -31,6 +31,9 @@
</span><span class="cx"> #include "IDBRequestData.h"
</span><span class="cx"> #include "IDBResultData.h"
</span><span class="cx"> #include "Logging.h"
</span><ins>+#include "MemoryIDBBackingStore.h"
+#include <wtf/Locker.h>
+#include <wtf/MainThread.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -42,6 +45,8 @@
</span><span class="cx">
</span><span class="cx"> IDBServer::IDBServer()
</span><span class="cx"> {
</span><ins>+ Locker<Lock> locker(m_databaseThreadCreationLock);
+ m_threadID = createThread(IDBServer::databaseThreadEntry, this, "IndexedDatabase Server");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void IDBServer::registerConnection(IDBConnectionToClient& connection)
</span><span class="lines">@@ -58,24 +63,110 @@
</span><span class="cx"> m_connectionMap.remove(connection.identifier());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void IDBServer::deleteDatabase(const IDBRequestData& data)
</del><ins>+UniqueIDBDatabase& IDBServer::getOrCreateUniqueIDBDatabase(const IDBDatabaseIdentifier& identifier)
</ins><span class="cx"> {
</span><del>- LOG(IndexedDB, "IDBServer::deleteDatabase - %s", data.databaseIdentifier().debugString().utf8().data());
</del><ins>+ auto uniqueIDBDatabase = m_uniqueIDBDatabaseMap.add(identifier, nullptr);
+ if (uniqueIDBDatabase.isNewEntry)
+ uniqueIDBDatabase.iterator->value = UniqueIDBDatabase::create(*this, identifier);
+
+ return *uniqueIDBDatabase.iterator->value;
+}
+
+std::unique_ptr<IDBBackingStore> IDBServer::createBackingStore(const IDBDatabaseIdentifier& identifier)
+{
+ ASSERT(!isMainThread());
+
+ // FIXME: For now we only have the in-memory backing store, which we'll continue to use for private browsing.
+ // Once it's time for persistent backing stores this is where we'll calculate the correct path on disk
+ // and create it.
+
+ return MemoryIDBBackingStore::create(identifier);
+}
+
+void IDBServer::openDatabase(const IDBRequestData& requestData)
+{
+ LOG(IndexedDB, "IDBServer::openDatabase");
+
+ auto& uniqueIDBDatabase = getOrCreateUniqueIDBDatabase(requestData.databaseIdentifier());
+
+ auto connection = m_connectionMap.get(requestData.requestIdentifier().connectionIdentifier());
+ if (!connection) {
+ // If the connection back to the client is gone, there's no way to open the database as
+ // well as no way to message back failure.
+ return;
+ }
+
+ uniqueIDBDatabase.openDatabaseConnection(*connection, requestData);
+}
+
+void IDBServer::deleteDatabase(const IDBRequestData& requestData)
+{
+ LOG(IndexedDB, "IDBServer::deleteDatabase - %s", requestData.databaseIdentifier().debugString().utf8().data());
</ins><span class="cx">
</span><del>- auto connection = m_connectionMap.get(data.requestIdentifier().connectionIdentifier());
</del><ins>+ auto connection = m_connectionMap.get(requestData.requestIdentifier().connectionIdentifier());
</ins><span class="cx"> if (!connection) {
</span><del>- // If we don't have record of this connection (e.g. it has dropped due to a process crashing)
- // then we can't report back status of the operation.
- // Therefore we shouldn't bother performing it.
</del><ins>+ // If the connection back to the client is gone, there's no way to delete the database as
+ // well as no way to message back failure.
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: During bringup of modern IDB, the database deletion is a no-op, and is
</span><span class="cx"> // immediately reported back to the WebProcess as failure.
</span><del>- IDBResultData result(data.requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
</del><ins>+ IDBResultData result(requestData.requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
</ins><span class="cx"> connection->didDeleteDatabase(result);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void IDBServer::postDatabaseTask(std::unique_ptr<CrossThreadTask>&& task)
+{
+ ASSERT(isMainThread());
+ m_databaseQueue.append(WTF::move(task));
+}
+
+void IDBServer::postDatabaseTaskReply(std::unique_ptr<CrossThreadTask>&& task)
+{
+ ASSERT(!isMainThread());
+ m_databaseReplyQueue.append(WTF::move(task));
+
+
+ Locker<Lock> locker(m_mainThreadReplyLock);
+ if (m_mainThreadReplyScheduled)
+ return;
+
+ m_mainThreadReplyScheduled = true;
+ callOnMainThread([this] {
+ handleTaskRepliesOnMainThread();
+ });
+}
+
+void IDBServer::databaseThreadEntry(void* threadData)
+{
+ ASSERT(threadData);
+ IDBServer* server = reinterpret_cast<IDBServer*>(threadData);
+ server->databaseRunLoop();
+}
+
+void IDBServer::databaseRunLoop()
+{
+ ASSERT(!isMainThread());
+ {
+ Locker<Lock> locker(m_databaseThreadCreationLock);
+ }
+
+ while (auto task = m_databaseQueue.waitForMessage())
+ task->performTask();
+}
+
+void IDBServer::handleTaskRepliesOnMainThread()
+{
+ {
+ Locker<Lock> locker(m_mainThreadReplyLock);
+ m_mainThreadReplyScheduled = false;
+ }
+
+ while (auto task = m_databaseReplyQueue.tryGetMessage())
+ task->performTask();
+}
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -28,14 +28,20 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+#include "CrossThreadTask.h"
</ins><span class="cx"> #include "IDBConnectionToClient.h"
</span><ins>+#include "IDBDatabaseIdentifier.h"
+#include "UniqueIDBDatabase.h"
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><ins>+#include <wtf/Lock.h>
+#include <wtf/MessageQueue.h>
</ins><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class CrossThreadTask;
</ins><span class="cx"> class IDBRequestData;
</span><span class="cx">
</span><span class="cx"> namespace IDBServer {
</span><span class="lines">@@ -48,12 +54,33 @@
</span><span class="cx"> void unregisterConnection(IDBConnectionToClient&);
</span><span class="cx">
</span><span class="cx"> // Operations requested by the client.
</span><ins>+ void openDatabase(const IDBRequestData&);
</ins><span class="cx"> void deleteDatabase(const IDBRequestData&);
</span><span class="cx">
</span><ins>+ void postDatabaseTask(std::unique_ptr<CrossThreadTask>&&);
+ void postDatabaseTaskReply(std::unique_ptr<CrossThreadTask>&&);
+
+ std::unique_ptr<IDBBackingStore> createBackingStore(const IDBDatabaseIdentifier&);
+
</ins><span class="cx"> private:
</span><span class="cx"> IDBServer();
</span><span class="cx">
</span><ins>+ UniqueIDBDatabase& getOrCreateUniqueIDBDatabase(const IDBDatabaseIdentifier&);
+
+ static void databaseThreadEntry(void*);
+ void databaseRunLoop();
+ void handleTaskRepliesOnMainThread();
+
</ins><span class="cx"> HashMap<uint64_t, RefPtr<IDBConnectionToClient>> m_connectionMap;
</span><ins>+ HashMap<IDBDatabaseIdentifier, RefPtr<UniqueIDBDatabase>> m_uniqueIDBDatabaseMap;
+
+ ThreadIdentifier m_threadID { 0 };
+ Lock m_databaseThreadCreationLock;
+ Lock m_mainThreadReplyLock;
+ bool m_mainThreadReplyScheduled { false };
+
+ MessageQueue<CrossThreadTask> m_databaseQueue;
+ MessageQueue<CrossThreadTask> m_databaseReplyQueue;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace IDBServer
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerOperationcppfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientDelegateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,50 @@
</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 "config.h"
+#include "IDBServerOperation.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+namespace IDBServer {
+
+Ref<IDBServerOperation> IDBServerOperation::create(IDBConnectionToClient& connection, const IDBRequestData& requestData)
+{
+ return adoptRef(*new IDBServerOperation(connection, requestData));
+}
+
+IDBServerOperation::IDBServerOperation(IDBConnectionToClient& connection, const IDBRequestData& requestData)
+ : m_connection(connection)
+ , m_requestData(requestData)
+{
+}
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBServerOperationhfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBServerOperation.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,57 @@
</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.
+ */
+
+#ifndef IDBServerOperation_h
+#define IDBServerOperation_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBConnectionToClient.h"
+#include "IDBRequestData.h"
+#include <wtf/Ref.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+namespace IDBServer {
+
+class IDBServerOperation : public RefCounted<IDBServerOperation> {
+public:
+ static Ref<IDBServerOperation> create(IDBConnectionToClient&, const IDBRequestData&);
+
+ IDBConnectionToClient& connection() { return m_connection; }
+ const IDBRequestData& requestData() const { return m_requestData; }
+
+private:
+ IDBServerOperation(IDBConnectionToClient&, const IDBRequestData&);
+
+ IDBConnectionToClient& m_connection;
+ IDBRequestData m_requestData;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBServerOperation_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecppfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClientcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,59 @@
</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 "config.h"
+#include "MemoryIDBBackingStore.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+namespace IDBServer {
+
+std::unique_ptr<MemoryIDBBackingStore> MemoryIDBBackingStore::create(const IDBDatabaseIdentifier& identifier)
+{
+ return std::make_unique<MemoryIDBBackingStore>(identifier);
+}
+
+MemoryIDBBackingStore::MemoryIDBBackingStore(const IDBDatabaseIdentifier& identifier)
+ : m_identifier(identifier)
+{
+}
+
+MemoryIDBBackingStore::~MemoryIDBBackingStore()
+{
+}
+
+const IDBDatabaseInfo& MemoryIDBBackingStore::getOrEstablishDatabaseInfo()
+{
+ if (!m_databaseInfo)
+ m_databaseInfo = std::make_unique<IDBDatabaseInfo>(m_identifier.databaseName(), 0);
+
+ return *m_databaseInfo;
+}
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorehfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBConnectionToClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,57 @@
</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.
+ */
+
+#ifndef MemoryIDBBackingStore_h
+#define MemoryIDBBackingStore_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBBackingStore.h"
+#include "IDBDatabaseIdentifier.h"
+
+namespace WebCore {
+namespace IDBServer {
+
+class MemoryIDBBackingStore : public IDBBackingStore {
+ friend std::unique_ptr<MemoryIDBBackingStore> std::make_unique<MemoryIDBBackingStore>(const IDBDatabaseIdentifier&);
+public:
+ static std::unique_ptr<MemoryIDBBackingStore> create(const IDBDatabaseIdentifier&);
+
+ virtual ~MemoryIDBBackingStore() override final;
+
+ virtual const IDBDatabaseInfo& getOrEstablishDatabaseInfo() override final;
+
+private:
+ MemoryIDBBackingStore(const IDBDatabaseIdentifier&);
+
+ IDBDatabaseIdentifier m_identifier;
+ std::unique_ptr<IDBDatabaseInfo> m_databaseInfo;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // MemoryIDBBackingStore_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,98 @@
</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 "config.h"
+#include "UniqueIDBDatabase.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBResultData.h"
+#include "IDBServer.h"
+#include "Logging.h"
+#include <wtf/MainThread.h>
+#include <wtf/ThreadSafeRefCounted.h>
+
+namespace WebCore {
+namespace IDBServer {
+
+UniqueIDBDatabase::UniqueIDBDatabase(IDBServer& server, const IDBDatabaseIdentifier& identifier)
+ : m_server(server)
+ , m_identifier(identifier)
+{
+}
+
+void UniqueIDBDatabase::openDatabaseConnection(IDBConnectionToClient& connection, const IDBRequestData& requestData)
+{
+ auto operation = IDBServerOperation::create(connection, requestData);
+ m_pendingOpenDatabaseOperations.append(WTF::move(operation));
+
+ if (m_databaseInfo) {
+ handleOpenDatabaseOperations();
+ return;
+ }
+
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::openBackingStore, m_identifier));
+}
+
+void UniqueIDBDatabase::handleOpenDatabaseOperations()
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::handleOpenDatabaseOperations");
+
+ auto operation = m_pendingOpenDatabaseOperations.takeFirst();
+
+ // FIXME: Reporting open operations as failures for now.
+ // Creating database connections for success will be the next step.
+
+ IDBResultData result(operation->requestData().requestIdentifier(), IDBError(IDBExceptionCode::Unknown));
+ operation->connection().didOpenDatabase(result);
+}
+
+void UniqueIDBDatabase::openBackingStore(const IDBDatabaseIdentifier& identifier)
+{
+ ASSERT(!isMainThread());
+ LOG(IndexedDB, "(db) UniqueIDBDatabase::openBackingStore");
+
+ ASSERT(!m_backingStore);
+ m_backingStore = m_server.createBackingStore(identifier);
+ auto databaseInfo = m_backingStore->getOrEstablishDatabaseInfo();
+
+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didOpenBackingStore, databaseInfo));
+}
+
+void UniqueIDBDatabase::didOpenBackingStore(const IDBDatabaseInfo& info)
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::didOpenBackingStore");
+
+ m_databaseInfo = std::make_unique<IDBDatabaseInfo>(info);
+
+ handleOpenDatabaseOperations();
+}
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasehfromrev190378trunkSourceWebCoreModulesindexeddbserverIDBServerh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/server/IDBServer.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,81 @@
</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.
+ */
+
+#ifndef UniqueIDBDatabase_h
+#define UniqueIDBDatabase_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBBackingStore.h"
+#include "IDBDatabaseIdentifier.h"
+#include "IDBDatabaseInfo.h"
+#include "IDBServerOperation.h"
+#include <wtf/Deque.h>
+#include <wtf/Ref.h>
+#include <wtf/ThreadSafeRefCounted.h>
+
+namespace WebCore {
+
+class IDBRequestData;
+
+namespace IDBServer {
+
+class IDBConnectionToClient;
+class IDBServer;
+
+class UniqueIDBDatabase : public ThreadSafeRefCounted<UniqueIDBDatabase> {
+public:
+ static Ref<UniqueIDBDatabase> create(IDBServer& server, const IDBDatabaseIdentifier& identifier)
+ {
+ return adoptRef(*new UniqueIDBDatabase(server, identifier));
+ }
+
+ void openDatabaseConnection(IDBConnectionToClient&, const IDBRequestData&);
+
+private:
+ UniqueIDBDatabase(IDBServer&, const IDBDatabaseIdentifier&);
+
+ void handleOpenDatabaseOperations();
+
+ // Database thread operations
+ void openBackingStore(const IDBDatabaseIdentifier&);
+
+ // Main thread callbacks
+ void didOpenBackingStore(const IDBDatabaseInfo&);
+
+ IDBServer& m_server;
+ IDBDatabaseIdentifier m_identifier;
+
+ Deque<Ref<IDBServerOperation>> m_pendingOpenDatabaseOperations;
+
+ std::unique_ptr<IDBBackingStore> m_backingStore;
+ std::unique_ptr<IDBDatabaseInfo> m_databaseInfo;
+};
+
+} // namespace IDBServer
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // UniqueIDBDatabase_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfocppfromrev190378trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -0,0 +1,51 @@
</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 "config.h"
+#include "IDBDatabaseInfo.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+IDBDatabaseInfo::IDBDatabaseInfo(const String& name, uint64_t version)
+ : m_name(name)
+ , m_version(version)
+{
+}
+
+IDBDatabaseInfo IDBDatabaseInfo::isolatedCopy() const
+{
+ IDBDatabaseInfo info;
+
+ info.m_name = m_name.isolatedCopy();
+ info.m_version = m_version;
+
+ return WTF::move(info);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBDatabaseInfohfromrev190378trunkSourceWebCoreModulesindexeddbclientIDBConnectionToServerDelegateh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h (from rev 190378, trunk/Source/WebCore/Modules/indexeddb/client/IDBConnectionToServerDelegate.h) (0 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h         (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.h        2015-10-01 01:04:19 UTC (rev 190379)
</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.
+ */
+
+#ifndef IDBDatabaseInfo_h
+#define IDBDatabaseInfo_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class IDBDatabaseInfo {
+public:
+ IDBDatabaseInfo(const String& name, uint64_t version);
+
+ IDBDatabaseInfo isolatedCopy() const;
+
+private:
+ IDBDatabaseInfo()
+ {
+ }
+
+ String m_name;
+ uint64_t m_version { 0 };
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBDatabaseInfo_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -83,8 +83,25 @@
</span><span class="cx"> RefPtr<InProcessIDBServer> self(this);
</span><span class="cx"> RunLoop::current().dispatch([this, self, resultData] {
</span><span class="cx"> m_connectionToServer->didDeleteDatabase(resultData);
</span><del>- });}
</del><ins>+ });
+}
</ins><span class="cx">
</span><ins>+void InProcessIDBServer::openDatabase(IDBRequestData& requestData)
+{
+ RefPtr<InProcessIDBServer> self(this);
+ RunLoop::current().dispatch([this, self, requestData] {
+ m_server->openDatabase(requestData);
+ });
+}
+
+void InProcessIDBServer::didOpenDatabase(const IDBResultData& resultData)
+{
+ RefPtr<InProcessIDBServer> self(this);
+ RunLoop::current().dispatch([this, self, resultData] {
+ m_connectionToServer->didOpenDatabase(resultData);
+ });
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedInProcessIDBServerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -55,10 +55,12 @@
</span><span class="cx">
</span><span class="cx"> // IDBConnectionToServer
</span><span class="cx"> virtual void deleteDatabase(IDBRequestData&) override final;
</span><del>-
</del><ins>+ virtual void openDatabase(IDBRequestData&) override final;
+
</ins><span class="cx"> // IDBConnectionToClient
</span><span class="cx"> virtual uint64_t identifier() const override;
</span><span class="cx"> virtual void didDeleteDatabase(const IDBResultData&) override final;
</span><ins>+ virtual void didOpenDatabase(const IDBResultData&) override final;
</ins><span class="cx">
</span><span class="cx"> virtual void ref() override { RefCounted<InProcessIDBServer>::ref(); }
</span><span class="cx"> virtual void deref() override { RefCounted<InProcessIDBServer>::deref(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -1921,7 +1921,7 @@
</span><span class="cx">                 510A58E41BAA40B100C19282 /* InProcessIDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510A58E21BAA40AE00C19282 /* InProcessIDBServer.cpp */; };
</span><span class="cx">                 510A58E51BAA40B100C19282 /* InProcessIDBServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58E31BAA40AE00C19282 /* InProcessIDBServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 510A58F91BACC7F200C19282 /* IDBRequestData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510A58F51BACC4A500C19282 /* IDBRequestData.cpp */; };
</span><del>-                510A58FA1BACC7F200C19282 /* IDBRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58F61BACC4A500C19282 /* IDBRequestData.h */; };
</del><ins>+                510A58FA1BACC7F200C19282 /* IDBRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58F61BACC4A500C19282 /* IDBRequestData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 510A58FB1BACC7F200C19282 /* IDBRequestIdentifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510A58E61BAA41C900C19282 /* IDBRequestIdentifier.cpp */; };
</span><span class="cx">                 510A58FC1BACC7F200C19282 /* IDBRequestIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58E71BAA41C900C19282 /* IDBRequestIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 510D4A33103165EE0049EA54 /* SocketStreamErrorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510D4A2D103165EE0049EA54 /* SocketStreamErrorBase.cpp */; };
</span><span class="lines">@@ -2099,6 +2099,10 @@
</span><span class="cx">                 5185FCB91BB4CBF80012898F /* IDBConnectionToClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58FE1BB07AA500C19282 /* IDBConnectionToClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5185FCBA1BB4CBF80012898F /* IDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510A58EF1BAB720F00C19282 /* IDBServer.cpp */; };
</span><span class="cx">                 5185FCBB1BB4CBF80012898F /* IDBServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 510A58F01BAB720F00C19282 /* IDBServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                518864E01BBAF57100E540C9 /* UniqueIDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518864DE1BBAF30F00E540C9 /* UniqueIDBDatabase.cpp */; };
+                518864E11BBAF57400E540C9 /* UniqueIDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 518864DF1BBAF30F00E540C9 /* UniqueIDBDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                518864E61BBB4B8300E540C9 /* IDBServerOperation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518864E41BBB4B7E00E540C9 /* IDBServerOperation.cpp */; };
+                518864E71BBB4B8300E540C9 /* IDBServerOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 518864E51BBB4B7E00E540C9 /* IDBServerOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */; };
</span><span class="cx">                 5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */; };
</span><span class="cx">                 5189F0DE10B46B0E00F3C739 /* PopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */; };
</span><span class="lines">@@ -2127,6 +2131,11 @@
</span><span class="cx">                 51B45D201AB8D1E200117CD2 /* ContentExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51B45D1E1AB8D1E200117CD2 /* ContentExtension.cpp */; };
</span><span class="cx">                 51B45D211AB8D1E200117CD2 /* ContentExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B45D1F1AB8D1E200117CD2 /* ContentExtension.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51B58FD4195A964D002990B0 /* PlatformGamepad.h in Headers */ = {isa = PBXBuildFile; fileRef = 515E5FEF195101470086CA5E /* PlatformGamepad.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                51BA4AC31BBB5CD800DF3D6D /* IDBDatabaseInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BA4AC11BBB5CBF00DF3D6D /* IDBDatabaseInfo.cpp */; };
+                51BA4AC41BBB5CD800DF3D6D /* IDBDatabaseInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BA4AC21BBB5CBF00DF3D6D /* IDBDatabaseInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51BA4ACA1BBC5BD900DF3D6D /* MemoryIDBBackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51BA4AC81BBC5B9E00DF3D6D /* MemoryIDBBackingStore.cpp */; };
+                51BA4ACB1BBC5BD900DF3D6D /* MemoryIDBBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BA4AC91BBC5B9E00DF3D6D /* MemoryIDBBackingStore.h */; };
+                51BA4ACC1BBC5BDD00DF3D6D /* IDBBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BA4AC71BBC5AD600DF3D6D /* IDBBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE37DE0DAEE00E001085FC /* StorageArea.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51C0AA390F2AA10A001648C2 /* CachedFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0AA380F2AA10A001648C2 /* CachedFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51C0AA410F2AA15E001648C2 /* CachedFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */; };
</span><span class="lines">@@ -9414,6 +9423,10 @@
</span><span class="cx">                 5185FCB61BB4C7610012898F /* DOMRequestState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMRequestState.h; sourceTree = "<group>"; };
</span><span class="cx">                 5185FCBC1BB5CB770012898F /* IDBConnectionToServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBConnectionToServer.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5185FCBD1BB5CB770012898F /* IDBConnectionToServerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBConnectionToServerDelegate.h; sourceTree = "<group>"; };
</span><ins>+                518864DE1BBAF30F00E540C9 /* UniqueIDBDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueIDBDatabase.cpp; sourceTree = "<group>"; };
+                518864DF1BBAF30F00E540C9 /* UniqueIDBDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueIDBDatabase.h; sourceTree = "<group>"; };
+                518864E41BBB4B7E00E540C9 /* IDBServerOperation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBServerOperation.cpp; sourceTree = "<group>"; };
+                518864E51BBB4B7E00E540C9 /* IDBServerOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBServerOperation.h; sourceTree = "<group>"; };
</ins><span class="cx">                 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPopStateEvent.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPopStateEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 5189F0DD10B46B0E00F3C739 /* PopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PopStateEvent.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -9451,6 +9464,11 @@
</span><span class="cx">                 51B454E91B4DAE7D0085EAA6 /* PingHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PingHandle.h; sourceTree = "<group>"; };
</span><span class="cx">                 51B45D1E1AB8D1E200117CD2 /* ContentExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtension.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 51B45D1F1AB8D1E200117CD2 /* ContentExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentExtension.h; sourceTree = "<group>"; };
</span><ins>+                51BA4AC11BBB5CBF00DF3D6D /* IDBDatabaseInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseInfo.cpp; sourceTree = "<group>"; };
+                51BA4AC21BBB5CBF00DF3D6D /* IDBDatabaseInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseInfo.h; sourceTree = "<group>"; };
+                51BA4AC71BBC5AD600DF3D6D /* IDBBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBBackingStore.h; sourceTree = "<group>"; };
+                51BA4AC81BBC5B9E00DF3D6D /* MemoryIDBBackingStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryIDBBackingStore.cpp; sourceTree = "<group>"; };
+                51BA4AC91BBC5B9E00DF3D6D /* MemoryIDBBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryIDBBackingStore.h; sourceTree = "<group>"; };
</ins><span class="cx">                 51BE37DE0DAEE00E001085FC /* StorageArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageArea.h; sourceTree = "<group>"; };
</span><span class="cx">                 51C0AA380F2AA10A001648C2 /* CachedFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFrame.h; sourceTree = "<group>"; };
</span><span class="cx">                 51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CachedFrame.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
</span><span class="lines">@@ -16636,6 +16654,8 @@
</span><span class="cx">                 510A58E11BAA409800C19282 /* shared */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                51BA4AC11BBB5CBF00DF3D6D /* IDBDatabaseInfo.cpp */,
+                                51BA4AC21BBB5CBF00DF3D6D /* IDBDatabaseInfo.h */,
</ins><span class="cx">                                 5148453C1BB9D076006A72ED /* IDBError.cpp */,
</span><span class="cx">                                 5148453D1BB9D076006A72ED /* IDBError.h */,
</span><span class="cx">                                 510A58F51BACC4A500C19282 /* IDBRequestData.cpp */,
</span><span class="lines">@@ -16653,11 +16673,18 @@
</span><span class="cx">                 510A58EE1BAB71E000C19282 /* server */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                51BA4AC71BBC5AD600DF3D6D /* IDBBackingStore.h */,
</ins><span class="cx">                                 516D7D6D1BB5F06500AF7C77 /* IDBConnectionToClient.cpp */,
</span><span class="cx">                                 510A58FE1BB07AA500C19282 /* IDBConnectionToClient.h */,
</span><span class="cx">                                 516D7D6E1BB5F06500AF7C77 /* IDBConnectionToClientDelegate.h */,
</span><span class="cx">                                 510A58EF1BAB720F00C19282 /* IDBServer.cpp */,
</span><span class="cx">                                 510A58F01BAB720F00C19282 /* IDBServer.h */,
</span><ins>+                                518864E41BBB4B7E00E540C9 /* IDBServerOperation.cpp */,
+                                518864E51BBB4B7E00E540C9 /* IDBServerOperation.h */,
+                                51BA4AC81BBC5B9E00DF3D6D /* MemoryIDBBackingStore.cpp */,
+                                51BA4AC91BBC5B9E00DF3D6D /* MemoryIDBBackingStore.h */,
+                                518864DE1BBAF30F00E540C9 /* UniqueIDBDatabase.cpp */,
+                                518864DF1BBAF30F00E540C9 /* UniqueIDBDatabase.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = server;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -24656,6 +24683,7 @@
</span><span class="cx">                                 BC64641C11D7F416006455B0 /* DatasetDOMStringMap.h in Headers */,
</span><span class="cx">                                 85031B3E0A44EFC700F992E0 /* DataTransfer.h in Headers */,
</span><span class="cx">                                 4B8AF4AA0B1CE02B00687690 /* DataTransferAccessPolicy.h in Headers */,
</span><ins>+                                51BA4ACC1BBC5BDD00DF3D6D /* IDBBackingStore.h in Headers */,
</ins><span class="cx">                                 81AC5999131636E60009A7E0 /* DataTransferItem.h in Headers */,
</span><span class="cx">                                 81AC599A131636E60009A7E0 /* DataTransferItemList.h in Headers */,
</span><span class="cx">                                 E4A007831B820EC8002C5A6E /* DataURLDecoder.h in Headers */,
</span><span class="lines">@@ -25945,6 +25973,7 @@
</span><span class="cx">                                 A84EBD830CB8C97700079609 /* JSStyleSheetList.h in Headers */,
</span><span class="cx">                                 E1FF8F65180745D800132674 /* JSSubtleCrypto.h in Headers */,
</span><span class="cx">                                 B20111080AB7740500DB0E68 /* JSSVGAElement.h in Headers */,
</span><ins>+                                518864E71BBB4B8300E540C9 /* IDBServerOperation.h in Headers */,
</ins><span class="cx">                                 24D9129213CA951E00D21915 /* JSSVGAltGlyphDefElement.h in Headers */,
</span><span class="cx">                                 6515EC920D9723FF0063D49A /* JSSVGAltGlyphElement.h in Headers */,
</span><span class="cx">                                 24D9129613CA956100D21915 /* JSSVGAltGlyphItemElement.h in Headers */,
</span><span class="lines">@@ -26551,6 +26580,7 @@
</span><span class="cx">                                 BC5C762B1497FE1400BC4775 /* PlatformEvent.h in Headers */,
</span><span class="cx">                                 26601EBF14B3B9AD0012C0FE /* PlatformEventFactoryIOS.h in Headers */,
</span><span class="cx">                                 BCAA487014A052530088FAC4 /* PlatformEventFactoryMac.h in Headers */,
</span><ins>+                                51BA4AC41BBB5CD800DF3D6D /* IDBDatabaseInfo.h in Headers */,
</ins><span class="cx">                                 A723F77B1484CA4C008C6DBE /* PlatformExportMacros.h in Headers */,
</span><span class="cx">                                 51B58FD4195A964D002990B0 /* PlatformGamepad.h in Headers */,
</span><span class="cx">                                 935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */,
</span><span class="lines">@@ -26602,6 +26632,7 @@
</span><span class="cx">                                 B71FE6DF11091CB300DAEF77 /* PrintContext.h in Headers */,
</span><span class="cx">                                 A8EA7EBC0A1945D000A8EF5F /* ProcessingInstruction.h in Headers */,
</span><span class="cx">                                 E44613EC0CD681B500FADA75 /* ProgressEvent.h in Headers */,
</span><ins>+                                518864E11BBAF57400E540C9 /* UniqueIDBDatabase.h in Headers */,
</ins><span class="cx">                                 A715E653134BBBEC00D8E713 /* ProgressShadowElement.h in Headers */,
</span><span class="cx">                                 1A2A68240B5BEDE70002A480 /* ProgressTracker.h in Headers */,
</span><span class="cx">                                 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */,
</span><span class="lines">@@ -26828,6 +26859,7 @@
</span><span class="cx">                                 514C767F0CE923A1007EF3CD /* ResourceResponseBase.h in Headers */,
</span><span class="cx">                                 FD3160A512B026F700C1A359 /* Reverb.h in Headers */,
</span><span class="cx">                                 FD3160A712B026F700C1A359 /* ReverbAccumulationBuffer.h in Headers */,
</span><ins>+                                51BA4ACB1BBC5BD900DF3D6D /* MemoryIDBBackingStore.h in Headers */,
</ins><span class="cx">                                 FD3160A912B026F700C1A359 /* ReverbConvolver.h in Headers */,
</span><span class="cx">                                 FD3160AB12B026F700C1A359 /* ReverbConvolverStage.h in Headers */,
</span><span class="cx">                                 FD3160AD12B026F700C1A359 /* ReverbInputBuffer.h in Headers */,
</span><span class="lines">@@ -28158,6 +28190,7 @@
</span><span class="cx">                                 45830D4D1679B4F800ACF8C3 /* AutoscrollController.cpp in Sources */,
</span><span class="cx">                                 A8CFF0500A154F09000A4234 /* AutoTableLayout.cpp in Sources */,
</span><span class="cx">                                 070363E1181A1CDC00C074A5 /* AVAudioCaptureSource.mm in Sources */,
</span><ins>+                                518864E61BBB4B8300E540C9 /* IDBServerOperation.cpp in Sources */,
</ins><span class="cx">                                 070363E3181A1CDC00C074A5 /* AVCaptureDeviceManager.mm in Sources */,
</span><span class="cx">                                 070363E5181A1CDC00C074A5 /* AVMediaCaptureSource.mm in Sources */,
</span><span class="cx">                                 CD336F6117F9F64700DDDCD0 /* AVTrackPrivateAVFObjCImpl.mm in Sources */,
</span><span class="lines">@@ -28615,6 +28648,7 @@
</span><span class="cx">                                 8540756C0AD6CBF900620C57 /* DOMHTMLOptionElement.mm in Sources */,
</span><span class="cx">                                 85DF2F9C0AA3CAE500AD64C5 /* DOMHTMLOptionsCollection.mm in Sources */,
</span><span class="cx">                                 85183B470AA6926100F19FA3 /* DOMHTMLParagraphElement.mm in Sources */,
</span><ins>+                                518864E01BBAF57100E540C9 /* UniqueIDBDatabase.cpp in Sources */,
</ins><span class="cx">                                 85ECBEF80AA7626900544F0B /* DOMHTMLParamElement.mm in Sources */,
</span><span class="cx">                                 85183B490AA6926100F19FA3 /* DOMHTMLPreElement.mm in Sources */,
</span><span class="cx">                                 A4226E961163D73A008B8397 /* DOMHTMLProgressElement.mm in Sources */,
</span><span class="lines">@@ -30047,6 +30081,7 @@
</span><span class="cx">                                 443F04270E75C8FB007E5407 /* NetworkStateNotifierIOS.mm in Sources */,
</span><span class="cx">                                 1A7FA6490DDA3CBA0028F8A5 /* NetworkStateNotifierMac.cpp in Sources */,
</span><span class="cx">                                 E13EF34916850C470034C83F /* NetworkStorageSessionCFNet.cpp in Sources */,
</span><ins>+                                51BA4ACA1BBC5BD900DF3D6D /* MemoryIDBBackingStore.cpp in Sources */,
</ins><span class="cx">                                 269397261A4A5FBD00E8349D /* NFA.cpp in Sources */,
</span><span class="cx">                                 267726001A5B3AD9003C24DD /* NFAToDFA.cpp in Sources */,
</span><span class="cx">                                 BCEF43E00E674110001C1287 /* NinePieceImage.cpp in Sources */,
</span><span class="lines">@@ -30854,6 +30889,7 @@
</span><span class="cx">                                 A1DE71321861322200734192 /* TouchConstructors.cpp in Sources */,
</span><span class="cx">                                 A1DE712D18612AC100734192 /* TouchEvents.cpp in Sources */,
</span><span class="cx">                                 070334D9145A006F008D8D45 /* TrackBase.cpp in Sources */,
</span><ins>+                                51BA4AC31BBB5CD800DF3D6D /* IDBDatabaseInfo.cpp in Sources */,
</ins><span class="cx">                                 070334D31459FFAD008D8D45 /* TrackEvent.cpp in Sources */,
</span><span class="cx">                                 BE88E0C11715CE2600658D98 /* TrackListBase.cpp in Sources */,
</span><span class="cx">                                 FFAC30FF184FB145008C4F1E /* TrailingObjects.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.cpp (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.cpp        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -42,6 +42,8 @@
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><ins>+#include "IDBDatabaseIdentifier.h"
+#include "IDBDatabaseInfo.h"
</ins><span class="cx"> #include "IDBDatabaseMetadata.h"
</span><span class="cx"> #include "IDBGetResult.h"
</span><span class="cx"> #include "IDBKeyData.h"
</span><span class="lines">@@ -127,6 +129,15 @@
</span><span class="cx"> return metadata.isolatedCopy();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+CrossThreadCopierBase<false, false, IDBDatabaseInfo>::Type CrossThreadCopierBase<false, false, IDBDatabaseInfo>::copy(const IDBDatabaseInfo& info)
+{
+ return info.isolatedCopy();
+}
+
+CrossThreadCopierBase<false, false, IDBDatabaseIdentifier>::Type CrossThreadCopierBase<false, false, IDBDatabaseIdentifier>::copy(const IDBDatabaseIdentifier& identifier)
+{
+ return identifier.isolatedCopy();
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // Test CrossThreadCopier using COMPILE_ASSERT.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCrossThreadCopierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CrossThreadCopier.h (190378 => 190379)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-10-01 00:40:12 UTC (rev 190378)
+++ trunk/Source/WebCore/platform/CrossThreadCopier.h        2015-10-01 01:04:19 UTC (rev 190379)
</span><span class="lines">@@ -190,6 +190,19 @@
</span><span class="cx"> typedef IDBObjectStoreMetadata Type;
</span><span class="cx"> static Type copy(const IDBObjectStoreMetadata&);
</span><span class="cx"> };
</span><ins>+
+ class IDBDatabaseInfo;
+ template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseInfo> {
+ typedef IDBDatabaseInfo Type;
+ static Type copy(const IDBDatabaseInfo&);
+ };
+
+ class IDBDatabaseIdentifier;
+ template<> struct WEBCORE_EXPORT CrossThreadCopierBase<false, false, IDBDatabaseIdentifier> {
+ typedef IDBDatabaseIdentifier Type;
+ static Type copy(const IDBDatabaseIdentifier&);
+ };
+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> template<typename T>
</span></span></pre>
</div>
</div>
</body>
</html>