<!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>[199499] trunk/Source/WebCore</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/199499">199499</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-04-13 09:28:40 -0700 (Wed, 13 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modern IDB (Blob support): Support deleting stored blob files.
https://bugs.webkit.org/show_bug.cgi?id=156523
Reviewed by Alex Christensen.
No new tests (No testable change in behavior yet, current tests pass).
There's 3 points in time when we need to delete blob files (and records of them):
1 - When deleting a specific object store record.
2 - When deleting an entire object store.
3 - When deleting a whole database.
This patch does those three things.
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
(WebCore::IDBServer::SQLiteIDBTransaction::addRemovedBlobFile):
* Modules/indexeddb/server/SQLiteIDBTransaction.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199498 => 199499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-13 16:25:13 UTC (rev 199498)
+++ trunk/Source/WebCore/ChangeLog        2016-04-13 16:28:40 UTC (rev 199499)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2016-04-13 Brady Eidson <beidson@apple.com>
+
+ Modern IDB (Blob support): Support deleting stored blob files.
+ https://bugs.webkit.org/show_bug.cgi?id=156523
+
+ Reviewed by Alex Christensen.
+
+ No new tests (No testable change in behavior yet, current tests pass).
+
+ There's 3 points in time when we need to delete blob files (and records of them):
+ 1 - When deleting a specific object store record.
+ 2 - When deleting an entire object store.
+ 3 - When deleting a whole database.
+
+ This patch does those three things.
+
+ * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
+ (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
+ (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
+ (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
+ * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
+
+ * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
+ (WebCore::IDBServer::SQLiteIDBTransaction::commit):
+ (WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
+ (WebCore::IDBServer::SQLiteIDBTransaction::addRemovedBlobFile):
+ * Modules/indexeddb/server/SQLiteIDBTransaction.h:
+
</ins><span class="cx"> 2016-04-13 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><span class="cx"> Fix two coding mistakes in MathMLInlineContainerElement::childrenChanged
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (199498 => 199499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-04-13 16:25:13 UTC (rev 199498)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp        2016-04-13 16:28:40 UTC (rev 199499)
</span><span class="lines">@@ -941,9 +941,24 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // Delete all unused Blob URL records.
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM BlobRecords WHERE objectStoreRow NOT IN (SELECT recordID FROM Records)"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete Blob URL records(%i) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Could not delete stored blob records for deleted object store") };
+ }
+ }
+
+ // Delete all unused Blob File records.
+ auto error = deleteUnusedBlobFileRecords(*transaction);
+ if (!error.isNull())
+ return error;
+
</ins><span class="cx"> m_databaseInfo->deleteObjectStore(objectStoreIdentifier);
</span><span class="cx">
</span><del>- return true;
</del><ins>+ return { };
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> IDBError SQLiteIDBBackingStore::clearObjectStore(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreID)
</span><span class="lines">@@ -1251,6 +1266,47 @@
</span><span class="cx"> return { };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+IDBError SQLiteIDBBackingStore::deleteUnusedBlobFileRecords(SQLiteIDBTransaction& transaction)
+{
+ LOG(IndexedDB, "SQLiteIDBBackingStore::deleteUnusedBlobFileRecords");
+
+ // Gather the set of blob URLs and filenames that are no longer in use.
+ HashSet<String> removedBlobFilenames;
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT fileName FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)"));
+
+ if (sql.prepare() != SQLITE_OK) {
+ LOG_ERROR("Error deleting stored blobs (%i) (Could not gather unused blobURLs) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Error deleting stored blobs") };
+ }
+
+ int result = sql.step();
+ while (result == SQLITE_ROW)
+ removedBlobFilenames.add(sql.getColumnText(1));
+
+ if (result != SQLITE_DONE) {
+ LOG_ERROR("Error deleting stored blobs (%i) (Could not gather unused blobURLs) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Error deleting stored blobs") };
+ }
+ }
+
+ // Remove the blob records that are no longer in use.
+ if (!removedBlobFilenames.isEmpty()) {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM BlobFiles WHERE blobURL NOT IN (SELECT blobURL FROM BlobRecords)"));
+
+ if (sql.prepare() != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Error deleting stored blobs (%i) (Could not delete blobFile records) - %s", m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Error deleting stored blobs") };
+ }
+ }
+
+ for (auto& file : removedBlobFilenames)
+ transaction.addRemovedBlobFile(file);
+
+ return { };
+}
+
</ins><span class="cx"> IDBError SQLiteIDBBackingStore::deleteRecord(SQLiteIDBTransaction& transaction, int64_t objectStoreID, const IDBKeyData& keyData)
</span><span class="cx"> {
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::deleteRecord - key %s, object store %" PRIu64, keyData.loggingString().utf8().data(), objectStoreID);
</span><span class="lines">@@ -1267,6 +1323,53 @@
</span><span class="cx"> return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to serialize IDBKeyData to be removed from the database") };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ // Get the record ID
+ int64_t recordID;
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT recordID FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
+
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, objectStoreID) != SQLITE_OK
+ || sql.bindBlob(2, keyBuffer->data(), keyBuffer->size()) != SQLITE_OK) {
+ LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Failed to delete record from object store") };
+ }
+
+ int result = sql.step();
+
+ // If there's no record ID, there's no record to delete.
+ if (result == SQLITE_DONE)
+ return { };
+
+ if (result != SQLITE_ROW) {
+ LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (unable to fetch record ID) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Failed to delete record from object store") };
+ }
+
+ recordID = sql.getColumnInt64(0);
+ }
+
+ if (recordID < 1) {
+ LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (record ID is invalid) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Failed to delete record from object store") };
+ }
+
+ // Delete the blob records for this object store record.
+ {
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM BlobRecords WHERE objectStoreRow = ?;"));
+
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindInt64(1, recordID) != SQLITE_OK
+ || sql.step() != SQLITE_DONE) {
+ LOG_ERROR("Could not delete record from object store %" PRIi64 " (%i) (Could not delete BlobRecords records) - %s", objectStoreID, m_sqliteDB->lastError(), m_sqliteDB->lastErrorMsg());
+ return { IDBDatabaseException::UnknownError, ASCIILiteral("Failed to delete record from object store") };
+ }
+ }
+
+ auto error = deleteUnusedBlobFileRecords(transaction);
+ if (!error.isNull())
+ return error;
+
</ins><span class="cx"> // Delete record from object store
</span><span class="cx"> {
</span><span class="cx"> SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("DELETE FROM Records WHERE objectStoreID = ? AND key = CAST(? AS TEXT);"));
</span><span class="lines">@@ -1464,6 +1567,8 @@
</span><span class="cx"> LOG_ERROR("Indexing new object store record failed, but unable to remove the object store record itself");
</span><span class="cx"> return { IDBDatabaseException::UnknownError, ASCIILiteral("Indexing new object store record failed, but unable to remove the object store record itself") };
</span><span class="cx"> }
</span><ins>+
+ return error;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const Vector<String>& blobURLs = value.blobURLs();
</span><span class="lines">@@ -1862,6 +1967,32 @@
</span><span class="cx">
</span><span class="cx"> LOG(IndexedDB, "SQLiteIDBBackingStore::deleteBackingStore deleting file '%s' on disk", dbFilename.utf8().data());
</span><span class="cx">
</span><ins>+ Vector<String> blobFiles;
+ {
+ bool errored = true;
+
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("SELECT fileName FROM BlobFiles;"));
+ if (sql.prepare() == SQLITE_OK) {
+ int result = sql.step();
+ while (result == SQLITE_ROW) {
+ blobFiles.append(sql.getColumnText(0));
+ result = sql.step();
+ }
+
+ if (result == SQLITE_DONE)
+ errored = false;
+ }
+
+ if (errored)
+ LOG_ERROR("Error getting all blob filenames to be deleted");
+ }
+
+ String databaseDirectory = fullDatabaseDirectory();
+ for (auto& file : blobFiles) {
+ String fullPath = pathByAppendingComponent(databaseDirectory, file);
+ deleteFile(fullPath);
+ }
+
</ins><span class="cx"> if (m_sqliteDB) {
</span><span class="cx"> m_sqliteDB->close();
</span><span class="cx"> m_sqliteDB = nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBBackingStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h (199498 => 199499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-04-13 16:25:13 UTC (rev 199498)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h        2016-04-13 16:28:40 UTC (rev 199499)
</span><span class="lines">@@ -105,6 +105,8 @@
</span><span class="cx"> IDBError uncheckedPutIndexRecord(int64_t objectStoreID, int64_t indexID, const IDBKeyData& keyValue, const IDBKeyData& indexKey);
</span><span class="cx"> IDBError uncheckedHasIndexRecord(const IDBIndexInfo&, const IDBKeyData&, bool& hasRecord);
</span><span class="cx">
</span><ins>+ IDBError deleteUnusedBlobFileRecords(SQLiteIDBTransaction&);
+
</ins><span class="cx"> JSC::VM& vm();
</span><span class="cx"> JSC::JSGlobalObject& globalObject();
</span><span class="cx"> void initializeVM();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp (199498 => 199499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-04-13 16:25:13 UTC (rev 199498)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp        2016-04-13 16:28:40 UTC (rev 199499)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "FileSystem.h"
</span><span class="cx"> #include "IDBCursorInfo.h"
</span><span class="cx"> #include "IndexedDB.h"
</span><ins>+#include "Logging.h"
</ins><span class="cx"> #include "SQLiteIDBBackingStore.h"
</span><span class="cx"> #include "SQLiteIDBCursor.h"
</span><span class="cx"> #include "SQLiteTransaction.h"
</span><span class="lines">@@ -68,6 +69,7 @@
</span><span class="cx">
</span><span class="cx"> IDBError SQLiteIDBTransaction::commit()
</span><span class="cx"> {
</span><ins>+ LOG(IndexedDB, "SQLiteIDBTransaction::commit");
</ins><span class="cx"> if (!m_sqliteTransaction || !m_sqliteTransaction->inProgress())
</span><span class="cx"> return { IDBDatabaseException::UnknownError, ASCIILiteral("No SQLite transaction in progress to commit") };
</span><span class="cx">
</span><span class="lines">@@ -76,6 +78,7 @@
</span><span class="cx"> if (m_sqliteTransaction->inProgress())
</span><span class="cx"> return { IDBDatabaseException::UnknownError, ASCIILiteral("Unable to commit SQLite transaction in database backend") };
</span><span class="cx">
</span><ins>+ deleteBlobFilesIfNecessary();
</ins><span class="cx"> moveBlobFilesIfNecessary();
</span><span class="cx">
</span><span class="cx"> reset();
</span><span class="lines">@@ -97,6 +100,18 @@
</span><span class="cx"> m_blobTemporaryAndStoredFilenames.clear();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void SQLiteIDBTransaction::deleteBlobFilesIfNecessary()
+{
+ String databaseDirectory = m_backingStore.fullDatabaseDirectory();
+ for (auto& entry : m_blobRemovedFilenames) {
+ String fullPath = pathByAppendingComponent(databaseDirectory, entry);
+ m_backingStore.temporaryFileHandler().prepareForAccessToTemporaryFile(entry);
+ m_backingStore.temporaryFileHandler().accessToTemporaryFileComplete(entry);
+ }
+
+ m_blobRemovedFilenames.clear();
+}
+
</ins><span class="cx"> IDBError SQLiteIDBTransaction::abort()
</span><span class="cx"> {
</span><span class="cx"> for (auto& entry : m_blobTemporaryAndStoredFilenames) {
</span><span class="lines">@@ -202,6 +217,13 @@
</span><span class="cx"> m_blobTemporaryAndStoredFilenames.append({ temporaryPath, storedFilename });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void SQLiteIDBTransaction::addRemovedBlobFile(const String& removedFilename)
+{
+ ASSERT(!m_blobRemovedFilenames.contains(removedFilename));
+ m_blobRemovedFilenames.add(removedFilename);
+}
+
+
</ins><span class="cx"> } // namespace IDBServer
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverSQLiteIDBTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h (199498 => 199499)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-04-13 16:25:13 UTC (rev 199498)
+++ trunk/Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.h        2016-04-13 16:28:40 UTC (rev 199499)
</span><span class="lines">@@ -72,12 +72,14 @@
</span><span class="cx"> SQLiteTransaction* sqliteTransaction() const { return m_sqliteTransaction.get(); }
</span><span class="cx">
</span><span class="cx"> void addBlobFile(const String& temporaryPath, const String& storedFilename);
</span><ins>+ void addRemovedBlobFile(const String& removedFilename);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> void clearCursors();
</span><span class="cx"> void reset();
</span><span class="cx">
</span><span class="cx"> void moveBlobFilesIfNecessary();
</span><ins>+ void deleteBlobFilesIfNecessary();
</ins><span class="cx">
</span><span class="cx"> IDBTransactionInfo m_info;
</span><span class="cx">
</span><span class="lines">@@ -86,6 +88,7 @@
</span><span class="cx"> HashMap<IDBResourceIdentifier, std::unique_ptr<SQLiteIDBCursor>> m_cursors;
</span><span class="cx"> HashSet<SQLiteIDBCursor*> m_backingStoreCursors;
</span><span class="cx"> Vector<std::pair<String, String>> m_blobTemporaryAndStoredFilenames;
</span><ins>+ HashSet<String> m_blobRemovedFilenames;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace IDBServer
</span></span></pre>
</div>
</div>
</body>
</html>