<!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>[195527] 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/195527">195527</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-01-24 23:55:17 -0800 (Sun, 24 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
https://bugs.webkit.org/show_bug.cgi?id=153415

Reviewed by Darin Adler.

Source/WebCore:

No new tests (Handful of tests now pass, improvements on a handful of others).

* Modules/indexeddb/server/IDBBackingStore.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
(WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted.
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:

* Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
(WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
* Modules/indexeddb/server/SQLiteIDBCursor.h:

* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::deleteIndex):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk1TestExpectations">trunk/LayoutTests/platform/mac-wk1/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.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="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactionh">trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.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="#trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/LayoutTests/ChangeLog        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-01-24  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
+        https://bugs.webkit.org/show_bug.cgi?id=153415
+
+        Reviewed by Darin Adler.
+
+        * platform/mac-wk1/TestExpectations:
+
</ins><span class="cx"> 2016-01-24  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, update test after r195497
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk1TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -494,7 +494,6 @@
</span><span class="cx"> storage/indexeddb/modern/get-keyrange.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/idbobjectstore-clear-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/idbobjectstore-clear-2.html [ Failure ]
</span><del>-storage/indexeddb/modern/idbobjectstore-count-1.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/idbobjectstore-delete-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/index-1.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/index-2.html [ Failure ]
</span><span class="lines">@@ -504,7 +503,6 @@
</span><span class="cx"> storage/indexeddb/modern/index-cursor-2.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/index-cursor-3.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/index-get-count-basic.html [ Failure ]
</span><del>-storage/indexeddb/modern/index-get-count-failures.html [ Failure ]
</del><span class="cx"> storage/indexeddb/modern/objectstore-cursor-advance-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/objectstore-cursor-continue-failures.html [ Failure ]
</span><span class="cx"> storage/indexeddb/modern/request-readystate.html [ Failure ]
</span><span class="lines">@@ -530,7 +528,6 @@
</span><span class="cx"> storage/indexeddb/objectstore-autoincrement.html [ Failure ]
</span><span class="cx"> storage/indexeddb/objectstore-basics.html [ Failure ]
</span><span class="cx"> storage/indexeddb/objectstore-clear.html [ Failure ]
</span><del>-storage/indexeddb/objectstore-count.html [ Failure ]
</del><span class="cx"> storage/indexeddb/objectstore-cursor.html [ Failure ]
</span><span class="cx"> storage/indexeddb/open-cursor.html [ Failure ]
</span><span class="cx"> storage/indexeddb/opencursor-key.html [ Failure ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/ChangeLog        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -1,5 +1,52 @@
</span><span class="cx"> 2016-01-24  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
+        https://bugs.webkit.org/show_bug.cgi?id=153415
+
+        Reviewed by Darin Adler.
+
+        No new tests (Handful of tests now pass, improvements on a handful of others).
+
+        * Modules/indexeddb/server/IDBBackingStore.h:
+        
+        * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+        (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
+        * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/MemoryObjectStore.cpp:
+        (WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier):
+        (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
+        (WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
+        (WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted.
+        * Modules/indexeddb/server/MemoryObjectStore.h:
+        
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
+        (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+        
+        * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
+        (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
+        (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
+        * Modules/indexeddb/server/SQLiteIDBCursor.h:
+        
+        * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
+        (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
+        * Modules/indexeddb/server/SQLiteIDBTransaction.h:
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
+        (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
+        (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
+        * Modules/indexeddb/server/UniqueIDBDatabase.h:
+        
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
+        (WebCore::IDBObjectStoreInfo::deleteIndex):
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+
+2016-01-24  Brady Eidson  &lt;beidson@apple.com&gt;
+
</ins><span class="cx">         Unreviewed, speculative fix for:
</span><span class="cx">         Modern IDB: Some IDB tests crash in ~SQLiteIDBBackingStore
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=153418
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) = 0;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) = 0;
</span><del>-    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) = 0;
</del><ins>+    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) = 0;
</ins><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) = 0;
</span><span class="cx">     virtual IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) = 0;
</span><span class="cx">     virtual IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">     return objectStore-&gt;createIndex(*rawTransaction, info);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryIDBBackingStore::deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName)
</del><ins>+IDBError MemoryIDBBackingStore::deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryIDBBackingStore::deleteIndex&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx">     if (!objectStore)
</span><span class="cx">         return IDBError(IDBDatabaseException::ConstraintError);
</span><span class="cx"> 
</span><del>-    return objectStore-&gt;deleteIndex(*rawTransaction, indexName);
</del><ins>+    return objectStore-&gt;deleteIndex(*rawTransaction, indexIdentifier);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort(MemoryObjectStore&amp; objectStore)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) override final;
</span><del>-    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) override final;
</del><ins>+    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) override final;
</ins><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) override final;
</span><span class="cx">     virtual IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) override final;
</span><span class="cx">     virtual IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) override final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -124,31 +124,31 @@
</span><span class="cx">     registerIndex(WTFMove(index));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;MemoryIndex&gt; MemoryObjectStore::takeIndexByName(const String&amp; name)
</del><ins>+RefPtr&lt;MemoryIndex&gt; MemoryObjectStore::takeIndexByIdentifier(uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><del>-    auto indexByName = m_indexesByName.take(name);
-    if (!indexByName)
</del><ins>+    auto indexByIdentifier = m_indexesByIdentifier.take(indexIdentifier);
+    if (!indexByIdentifier)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    auto index = m_indexesByIdentifier.take(indexByName-&gt;info().identifier());
</del><ins>+    auto index = m_indexesByName.take(indexByIdentifier-&gt;info().name());
</ins><span class="cx">     ASSERT(index);
</span><span class="cx"> 
</span><span class="cx">     return index;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError MemoryObjectStore::deleteIndex(MemoryBackingStoreTransaction&amp; transaction, const String&amp; indexName)
</del><ins>+IDBError MemoryObjectStore::deleteIndex(MemoryBackingStoreTransaction&amp; transaction, uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;MemoryObjectStore::deleteIndex&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (!m_writeTransaction || !m_writeTransaction-&gt;isVersionChange() || m_writeTransaction != &amp;transaction)
</span><span class="cx">         return IDBError(IDBDatabaseException::ConstraintError);
</span><span class="cx">     
</span><del>-    auto index = takeIndexByName(indexName);
</del><ins>+    auto index = takeIndexByIdentifier(indexIdentifier);
</ins><span class="cx">     ASSERT(index);
</span><span class="cx">     if (!index)
</span><span class="cx">         return IDBError(IDBDatabaseException::ConstraintError);
</span><span class="cx"> 
</span><del>-    m_info.deleteIndex(indexName);
</del><ins>+    m_info.deleteIndex(indexIdentifier);
</ins><span class="cx">     transaction.indexDeleted(*index);
</span><span class="cx"> 
</span><span class="cx">     return { };
</span><span class="lines">@@ -156,14 +156,14 @@
</span><span class="cx"> 
</span><span class="cx"> void MemoryObjectStore::deleteAllIndexes(MemoryBackingStoreTransaction&amp; transaction)
</span><span class="cx"> {
</span><del>-    Vector&lt;String&gt; indexNames;
-    indexNames.reserveInitialCapacity(m_indexesByName.size());
</del><ins>+    Vector&lt;uint64_t&gt; indexIdentifiers;
+    indexIdentifiers.reserveInitialCapacity(m_indexesByName.size());
</ins><span class="cx"> 
</span><del>-    for (auto&amp; name : m_indexesByName.keys())
-        indexNames.uncheckedAppend(name);
</del><ins>+    for (auto&amp; index : m_indexesByName.values())
+        indexIdentifiers.uncheckedAppend(index-&gt;info().identifier());
</ins><span class="cx"> 
</span><del>-    for (auto&amp; name : indexNames)
-        deleteIndex(transaction, name);
</del><ins>+    for (auto identifier : indexIdentifiers)
+        deleteIndex(transaction, identifier);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool MemoryObjectStore::containsRecord(const IDBKeyData&amp; key)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverMemoryObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx">     MemoryBackingStoreTransaction* writeTransaction() { return m_writeTransaction; }
</span><span class="cx"> 
</span><span class="cx">     IDBError createIndex(MemoryBackingStoreTransaction&amp;, const IDBIndexInfo&amp;);
</span><del>-    IDBError deleteIndex(MemoryBackingStoreTransaction&amp;, const String&amp; indexName);
</del><ins>+    IDBError deleteIndex(MemoryBackingStoreTransaction&amp;, uint64_t indexIdentifier);
</ins><span class="cx">     void deleteAllIndexes(MemoryBackingStoreTransaction&amp;);
</span><span class="cx">     void registerIndex(Ref&lt;MemoryIndex&gt;&amp;&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">     void updateCursorsForPutRecord(std::set&lt;IDBKeyData&gt;::iterator);
</span><span class="cx">     void updateCursorsForDeleteRecord(const IDBKeyData&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;MemoryIndex&gt; takeIndexByName(const String&amp; name);
</del><ins>+    RefPtr&lt;MemoryIndex&gt; takeIndexByIdentifier(uint64_t indexIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     IDBObjectStoreInfo m_info;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -720,7 +720,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Write index records for any records that already exist in this object store.
</span><span class="cx"> 
</span><del>-    auto cursor = transaction-&gt;maybeOpenBackingStoreCursor(info.objectStoreIdentifier());
</del><ins>+    auto cursor = transaction-&gt;maybeOpenBackingStoreCursor(info.objectStoreIdentifier(), 0, IDBKeyRangeData::allKeys());
</ins><span class="cx"> 
</span><span class="cx">     if (!cursor) {
</span><span class="cx">         LOG_ERROR(&quot;Cannot open cursor to populate indexes in database&quot;);
</span><span class="lines">@@ -849,9 +849,47 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::deleteIndex(const IDBResourceIdentifier&amp;, uint64_t, const String&amp;)
</del><ins>+IDBError SQLiteIDBBackingStore::deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    LOG(IndexedDB, &quot;SQLiteIDBBackingStore::deleteIndex - object store %&quot; PRIu64, objectStoreIdentifier);
+
+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    auto* transaction = m_transactions.get(transactionIdentifier);
+    if (!transaction || !transaction-&gt;inProgress()) {
+        LOG_ERROR(&quot;Attempt to delete index without an in-progress transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete index without an in-progress transaction&quot;) };
+    }
+
+    if (transaction-&gt;mode() != IndexedDB::TransactionMode::VersionChange) {
+        LOG_ERROR(&quot;Attempt to delete index during a non-version-change transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete index during a non-version-change transaction&quot;) };
+    }
+
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM IndexInfo WHERE id = ? AND objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, indexIdentifier) != SQLITE_OK
+            || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete index id %&quot; PRIi64 &quot; from IndexInfo table (%i) - %s&quot;, objectStoreIdentifier, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Error deleting index from database&quot;) };
+        }
+    }
+
+    {
+        SQLiteStatement sql(*m_sqliteDB, ASCIILiteral(&quot;DELETE FROM IndexRecords WHERE indexID = ? AND objectStoreID = ?;&quot;));
+        if (sql.prepare() != SQLITE_OK
+            || sql.bindInt64(1, indexIdentifier) != SQLITE_OK
+            || sql.bindInt64(2, objectStoreIdentifier) != SQLITE_OK
+            || sql.step() != SQLITE_DONE) {
+            LOG_ERROR(&quot;Could not delete index records for index id %&quot; PRIi64 &quot; from IndexRecords table (%i) - %s&quot;, indexIdentifier, m_sqliteDB-&gt;lastError(), m_sqliteDB-&gt;lastErrorMsg());
+            return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Error deleting index records from database&quot;) };
+        }
+    }
+
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBError SQLiteIDBBackingStore::keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreID, const IDBKeyData&amp; keyData, bool&amp; keyExists)
</span><span class="lines">@@ -1093,9 +1131,30 @@
</span><span class="cx">     return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier&amp;, uint64_t, uint64_t, const IDBKeyRangeData&amp;, uint64_t&amp;)
</del><ins>+IDBError SQLiteIDBBackingStore::getCount(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&amp; range, uint64_t&amp; outCount)
</ins><span class="cx"> {
</span><del>-    return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Not implemented&quot;) };
</del><ins>+    LOG(IndexedDB, &quot;SQLiteIDBBackingStore::getCount - object store %&quot; PRIu64, objectStoreIdentifier);
+    ASSERT(m_sqliteDB);
+    ASSERT(m_sqliteDB-&gt;isOpen());
+
+    outCount = 0;
+
+    auto* transaction = m_transactions.get(transactionIdentifier);
+    if (!transaction || !transaction-&gt;inProgress()) {
+        LOG_ERROR(&quot;Attempt to get count from database without an in-progress transaction&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to get count from database without an in-progress transaction&quot;) };
+    }
+
+    auto cursor = transaction-&gt;maybeOpenBackingStoreCursor(objectStoreIdentifier, indexIdentifier, range);
+    if (!cursor) {
+        LOG_ERROR(&quot;Cannot open cursor to populate indexes in database&quot;);
+        return { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Unable to populate indexes in database&quot;) };
+    }
+
+    while (cursor-&gt;advance(1))
+        ++outCount;
+
+    return { };
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> IDBError SQLiteIDBBackingStore::generateKeyNumber(const IDBResourceIdentifier&amp;, uint64_t, uint64_t&amp;)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">     virtual IDBError deleteObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError clearObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier) override final;
</span><span class="cx">     virtual IDBError createIndex(const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;) override final;
</span><del>-    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName) override final;
</del><ins>+    virtual IDBError deleteIndex(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier) override final;
</ins><span class="cx">     virtual IDBError keyExistsInObjectStore(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, bool&amp; keyExists) override final;
</span><span class="cx">     virtual IDBError deleteRange(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;) override final;
</span><span class="cx">     virtual IDBError addRecord(const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; value) override final;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -51,9 +51,9 @@
</span><span class="cx">     return cursor;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;SQLiteIDBCursor&gt; SQLiteIDBCursor::maybeCreateBackingStoreCursor(SQLiteIDBTransaction&amp; transaction, const uint64_t objectStoreIdentifier)
</del><ins>+std::unique_ptr&lt;SQLiteIDBCursor&gt; SQLiteIDBCursor::maybeCreateBackingStoreCursor(SQLiteIDBTransaction&amp; transaction, const uint64_t objectStoreID, const uint64_t indexID, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><del>-    auto cursor = std::make_unique&lt;SQLiteIDBCursor&gt;(transaction, objectStoreIdentifier);
</del><ins>+    auto cursor = std::make_unique&lt;SQLiteIDBCursor&gt;(transaction, objectStoreID, indexID, range);
</ins><span class="cx"> 
</span><span class="cx">     if (!cursor-&gt;establishStatement())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -75,11 +75,13 @@
</span><span class="cx">     ASSERT(m_objectStoreID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-SQLiteIDBCursor::SQLiteIDBCursor(SQLiteIDBTransaction&amp; transaction, uint64_t objectStoreID)
</del><ins>+SQLiteIDBCursor::SQLiteIDBCursor(SQLiteIDBTransaction&amp; transaction, const uint64_t objectStoreID, const uint64_t indexID, const IDBKeyRangeData&amp; range)
</ins><span class="cx">     : m_transaction(&amp;transaction)
</span><span class="cx">     , m_cursorIdentifier(transaction.transactionIdentifier())
</span><span class="cx">     , m_objectStoreID(objectStoreID)
</span><ins>+    , m_indexID(indexID ? indexID : IDBIndexMetadata::InvalidId)
</ins><span class="cx">     , m_cursorDirection(IndexedDB::CursorDirection::Next)
</span><ins>+    , m_keyRange(range)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_objectStoreID);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -46,10 +46,10 @@
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(SQLiteIDBCursor);
</span><span class="cx"> public:
</span><span class="cx">     static std::unique_ptr&lt;SQLiteIDBCursor&gt; maybeCreate(SQLiteIDBTransaction&amp;, const IDBCursorInfo&amp;);
</span><del>-    static std::unique_ptr&lt;SQLiteIDBCursor&gt; maybeCreateBackingStoreCursor(SQLiteIDBTransaction&amp;, const uint64_t objectStoreIdentifier);
</del><ins>+    static std::unique_ptr&lt;SQLiteIDBCursor&gt; maybeCreateBackingStoreCursor(SQLiteIDBTransaction&amp;, const uint64_t objectStoreIdentifier, const uint64_t indexIdentifier, const IDBKeyRangeData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     SQLiteIDBCursor(SQLiteIDBTransaction&amp;, const IDBCursorInfo&amp;);
</span><del>-    SQLiteIDBCursor(SQLiteIDBTransaction&amp;, uint64_t objectStoreID);
</del><ins>+    SQLiteIDBCursor(SQLiteIDBTransaction&amp;, uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData&amp;);
</ins><span class="cx"> 
</span><span class="cx">     const IDBResourceIdentifier&amp; identifier() const { return m_cursorIdentifier; }
</span><span class="cx">     SQLiteIDBTransaction* transaction() const { return m_transaction; }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -99,12 +99,12 @@
</span><span class="cx">     clearCursors();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;SQLiteIDBCursor&gt; SQLiteIDBTransaction::maybeOpenBackingStoreCursor(uint64_t objectStoreID)
</del><ins>+std::unique_ptr&lt;SQLiteIDBCursor&gt; SQLiteIDBTransaction::maybeOpenBackingStoreCursor(uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData&amp; range)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_sqliteTransaction);
</span><span class="cx">     ASSERT(m_sqliteTransaction-&gt;inProgress());
</span><span class="cx"> 
</span><del>-    return SQLiteIDBCursor::maybeCreateBackingStoreCursor(*this, objectStoreID);
</del><ins>+    return SQLiteIDBCursor::maybeCreateBackingStoreCursor(*this, objectStoreID, indexID, range);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SQLiteIDBCursor* SQLiteIDBTransaction::maybeOpenCursor(const IDBCursorInfo&amp; info)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">     IDBError commit();
</span><span class="cx">     IDBError abort();
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;SQLiteIDBCursor&gt; maybeOpenBackingStoreCursor(uint64_t objectStoreID);
</del><ins>+    std::unique_ptr&lt;SQLiteIDBCursor&gt; maybeOpenBackingStoreCursor(uint64_t objectStoreID, uint64_t indexID, const IDBKeyRangeData&amp;);
</ins><span class="cx">     SQLiteIDBCursor* maybeOpenCursor(const IDBCursorInfo&amp;);
</span><span class="cx"> 
</span><span class="cx">     void closeCursor(SQLiteIDBCursor&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -607,22 +607,35 @@
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::deleteIndex&quot;);
</span><span class="cx"> 
</span><span class="cx">     uint64_t callbackID = storeCallback(callback);
</span><del>-    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performDeleteIndex, callbackID, transaction.info().identifier(), objectStoreIdentifier, indexName));
</del><ins>+
+    auto* objectStoreInfo = m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreIdentifier);
+    if (!objectStoreInfo) {
+        performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete index from non-existant object store&quot;) });
+        return;
+    }
+
+    auto* indexInfo = objectStoreInfo-&gt;infoForExistingIndex(indexName);
+    if (!indexInfo) {
+        performErrorCallback(callbackID, { IDBDatabaseException::UnknownError, ASCIILiteral(&quot;Attempt to delete non-existant index&quot;) });
+        return;
+    }
+
+    m_server.postDatabaseTask(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::performDeleteIndex, callbackID, transaction.info().identifier(), objectStoreIdentifier, indexInfo-&gt;identifier()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName)
</del><ins>+void UniqueIDBDatabase::performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(db) UniqueIDBDatabase::performDeleteIndex&quot;);
</span><span class="cx"> 
</span><span class="cx">     ASSERT(m_backingStore);
</span><del>-    m_backingStore-&gt;deleteIndex(transactionIdentifier, objectStoreIdentifier, indexName);
</del><ins>+    m_backingStore-&gt;deleteIndex(transactionIdentifier, objectStoreIdentifier, indexIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     IDBError error;
</span><del>-    m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformDeleteIndex, callbackIdentifier, error, objectStoreIdentifier, indexName));
</del><ins>+    m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &amp;UniqueIDBDatabase::didPerformDeleteIndex, callbackIdentifier, error, objectStoreIdentifier, indexIdentifier));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void UniqueIDBDatabase::didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp; error, uint64_t objectStoreIdentifier, const String&amp; indexName)
</del><ins>+void UniqueIDBDatabase::didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp; error, uint64_t objectStoreIdentifier, uint64_t indexIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     LOG(IndexedDB, &quot;(main) UniqueIDBDatabase::didPerformDeleteIndex&quot;);
</span><span class="lines">@@ -630,7 +643,7 @@
</span><span class="cx">     if (error.isNull()) {
</span><span class="cx">         auto* objectStoreInfo = m_databaseInfo-&gt;infoForExistingObjectStore(objectStoreIdentifier);
</span><span class="cx">         if (objectStoreInfo)
</span><del>-            objectStoreInfo-&gt;deleteIndex(indexName);
</del><ins>+            objectStoreInfo-&gt;deleteIndex(indexIdentifier);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     performErrorCallback(callbackIdentifier, error);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverUniqueIDBDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     void performDeleteObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx">     void performClearObjectStore(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier);
</span><span class="cx">     void performCreateIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, const IDBIndexInfo&amp;);
</span><del>-    void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const String&amp; indexName);
</del><ins>+    void performDeleteIndex(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</ins><span class="cx">     void performPutOrAdd(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyData&amp;, const ThreadSafeDataBuffer&amp; valueData, IndexedDB::ObjectStoreOverwriteMode);
</span><span class="cx">     void performGetRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, const IDBKeyRangeData&amp;);
</span><span class="cx">     void performGetIndexRecord(uint64_t callbackIdentifier, const IDBResourceIdentifier&amp; transactionIdentifier, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, IndexedDB::IndexRecordType, const IDBKeyRangeData&amp;);
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">     void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier);
</span><span class="cx">     void didPerformClearObjectStore(uint64_t callbackIdentifier, const IDBError&amp;);
</span><span class="cx">     void didPerformCreateIndex(uint64_t callbackIdentifier, const IDBError&amp;, const IDBIndexInfo&amp;);
</span><del>-    void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier, const String&amp; indexName);
</del><ins>+    void didPerformDeleteIndex(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t objectStoreIdentifier, uint64_t indexIdentifier);
</ins><span class="cx">     void didPerformPutOrAdd(uint64_t callbackIdentifier, const IDBError&amp;, const IDBKeyData&amp;);
</span><span class="cx">     void didPerformGetRecord(uint64_t callbackIdentifier, const IDBError&amp;, const IDBGetResult&amp;);
</span><span class="cx">     void didPerformGetCount(uint64_t callbackIdentifier, const IDBError&amp;, uint64_t);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -113,6 +113,11 @@
</span><span class="cx">     m_indexMap.remove(info-&gt;identifier());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void IDBObjectStoreInfo::deleteIndex(uint64_t indexIdentifier)
+{
+    m_indexMap.remove(indexIdentifier);
+}
+
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> String IDBObjectStoreInfo::loggingString(int indent) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h (195526 => 195527)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-01-25 07:45:39 UTC (rev 195526)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-01-25 07:55:17 UTC (rev 195527)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">     Vector&lt;String&gt; indexNames() const;
</span><span class="cx"> 
</span><span class="cx">     void deleteIndex(const String&amp; indexName);
</span><ins>+    void deleteIndex(uint64_t indexIdentifier);
</ins><span class="cx"> 
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">     String loggingString(int indent = 0) const;
</span></span></pre>
</div>
</div>

</body>
</html>