<!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>[209873] 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/209873">209873</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-12-15 14:08:26 -0800 (Thu, 15 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add a new Logging Channel for IndexedDB Operation scheduling.
https://bugs.webkit.org/show_bug.cgi?id=165912
Reviewed by Alex Christensen.
No new tests (No behavior change).
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::internalAbort):
(WebCore::IDBTransaction::commit):
(WebCore::IDBTransaction::createObjectStore):
(WebCore::IDBTransaction::renameObjectStore):
(WebCore::IDBTransaction::createIndex):
(WebCore::IDBTransaction::renameIndex):
(WebCore::IDBTransaction::doRequestOpenCursor):
(WebCore::IDBTransaction::iterateCursor):
(WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
(WebCore::IDBTransaction::requestGetAllIndexRecords):
(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::requestCount):
(WebCore::IDBTransaction::requestDeleteRecord):
(WebCore::IDBTransaction::requestClearObjectStore):
(WebCore::IDBTransaction::requestPutOrAdd):
(WebCore::IDBTransaction::deleteObjectStore):
(WebCore::IDBTransaction::deleteIndex):
* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString):
* Modules/indexeddb/shared/IDBCursorInfo.h:
* Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
(WebCore::IDBGetAllRecordsData::loggingString):
* Modules/indexeddb/shared/IDBGetAllRecordsData.h:
* Modules/indexeddb/shared/IDBGetRecordData.cpp:
(WebCore::IDBGetRecordData::loggingString):
* Modules/indexeddb/shared/IDBGetRecordData.h:
* Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::condensedLoggingString):
* Modules/indexeddb/shared/IDBIndexInfo.h:
* Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString):
* Modules/indexeddb/shared/IDBIterateCursorData.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::condensedLoggingString):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
* platform/Logging.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBTransactioncpp">trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBGetAllRecordsDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBGetAllRecordsDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIndexInfocpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIndexInfoh">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatacpp">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatah">trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.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>
<li><a href="#trunkSourceWebCoreplatformLoggingh">trunk/Source/WebCore/platform/Logging.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/ChangeLog        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -1,3 +1,65 @@
</span><ins>+2016-12-15 Brady Eidson <beidson@apple.com>
+
+ Add a new Logging Channel for IndexedDB Operation scheduling.
+ https://bugs.webkit.org/show_bug.cgi?id=165912
+
+ Reviewed by Alex Christensen.
+
+ No new tests (No behavior change).
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::transaction):
+
+ * Modules/indexeddb/IDBFactory.cpp:
+ (WebCore::IDBFactory::openInternal):
+ (WebCore::IDBFactory::deleteDatabase):
+
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::internalAbort):
+ (WebCore::IDBTransaction::commit):
+ (WebCore::IDBTransaction::createObjectStore):
+ (WebCore::IDBTransaction::renameObjectStore):
+ (WebCore::IDBTransaction::createIndex):
+ (WebCore::IDBTransaction::renameIndex):
+ (WebCore::IDBTransaction::doRequestOpenCursor):
+ (WebCore::IDBTransaction::iterateCursor):
+ (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
+ (WebCore::IDBTransaction::requestGetAllIndexRecords):
+ (WebCore::IDBTransaction::requestGetRecord):
+ (WebCore::IDBTransaction::requestIndexRecord):
+ (WebCore::IDBTransaction::requestCount):
+ (WebCore::IDBTransaction::requestDeleteRecord):
+ (WebCore::IDBTransaction::requestClearObjectStore):
+ (WebCore::IDBTransaction::requestPutOrAdd):
+ (WebCore::IDBTransaction::deleteObjectStore):
+ (WebCore::IDBTransaction::deleteIndex):
+
+ * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+ (WebCore::IDBCursorInfo::loggingString):
+ * Modules/indexeddb/shared/IDBCursorInfo.h:
+
+ * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
+ (WebCore::IDBGetAllRecordsData::loggingString):
+ * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
+
+ * Modules/indexeddb/shared/IDBGetRecordData.cpp:
+ (WebCore::IDBGetRecordData::loggingString):
+ * Modules/indexeddb/shared/IDBGetRecordData.h:
+
+ * Modules/indexeddb/shared/IDBIndexInfo.cpp:
+ (WebCore::IDBIndexInfo::condensedLoggingString):
+ * Modules/indexeddb/shared/IDBIndexInfo.h:
+
+ * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
+ (WebCore::IDBIterateCursorData::loggingString):
+ * Modules/indexeddb/shared/IDBIterateCursorData.h:
+
+ * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
+ (WebCore::IDBObjectStoreInfo::condensedLoggingString):
+ * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
+
+ * platform/Logging.h:
+
</ins><span class="cx"> 2016-12-15 Konstantin Tokarev <annulen@yandex.ru>
</span><span class="cx">
</span><span class="cx"> Added missing override and final specifiers
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -203,6 +203,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> auto info = IDBTransactionInfo::clientTransaction(m_connectionProxy.get(), objectStores, mode);
</span><ins>+
+ LOG(IndexedDBOperations, "IDB creating transaction: %s", info.loggingString().utf8().data());
</ins><span class="cx"> auto transaction = IDBTransaction::create(*this, info);
</span><span class="cx">
</span><span class="cx"> LOG(IndexedDB, "IDBDatabase::transaction - Added active transaction %s", info.identifier().loggingString().utf8().data());
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -100,6 +100,8 @@
</span><span class="cx"> if (!databaseIdentifier.isValid())
</span><span class="cx"> return Exception { TypeError, ASCIILiteral("IDBFactory.open() called with an invalid security origin") };
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB opening database: %s %" PRIu64, name.utf8().data(), version);
+
</ins><span class="cx"> return m_connectionProxy->openDatabase(context, databaseIdentifier, version);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -119,6 +121,8 @@
</span><span class="cx"> if (!databaseIdentifier.isValid())
</span><span class="cx"> return Exception { TypeError, ASCIILiteral("IDBFactory.deleteDatabase() called with an invalid security origin") };
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB deleting database: %s", name.utf8().data());
+
</ins><span class="cx"> return m_connectionProxy->deleteDatabase(context, databaseIdentifier);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -249,6 +249,7 @@
</span><span class="cx">
</span><span class="cx"> m_abortQueue.swap(m_pendingTransactionOperationQueue);
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB abort-on-server operation: Transaction %s", info().identifier().loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, nullptr, &IDBTransaction::abortOnServerAndCancelRequests));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -499,6 +500,7 @@
</span><span class="cx"> transitionedToFinishing(IndexedDB::TransactionState::Committing);
</span><span class="cx"> m_database->willCommitTransaction(*this);
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB commit operation: Transaction %s", info().identifier().loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, nullptr, &IDBTransaction::commitOnServer));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -660,6 +662,7 @@
</span><span class="cx"> auto* rawObjectStore = objectStore.get();
</span><span class="cx"> m_referencedObjectStores.set(info.name(), WTFMove(objectStore));
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB create object store operation: %s", info.condensedLoggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didCreateObjectStoreOnServer, &IDBTransaction::createObjectStoreOnServer, info));
</span><span class="cx">
</span><span class="cx"> return *rawObjectStore;
</span><span class="lines">@@ -696,6 +699,8 @@
</span><span class="cx"> ASSERT(m_referencedObjectStores.get(objectStore.info().name()) == &objectStore);
</span><span class="cx">
</span><span class="cx"> uint64_t objectStoreIdentifier = objectStore.info().identifier();
</span><ins>+
+ LOG(IndexedDBOperations, "IDB rename object store operation: %s to %s", objectStore.info().condensedLoggingString().utf8().data(), newName.utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameObjectStoreOnServer, &IDBTransaction::renameObjectStoreOnServer, objectStoreIdentifier, newName));
</span><span class="cx">
</span><span class="cx"> m_referencedObjectStores.set(newName, m_referencedObjectStores.take(objectStore.info().name()));
</span><span class="lines">@@ -726,6 +731,7 @@
</span><span class="cx"> if (!scriptExecutionContext())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB create index operation: %s under object store %s", info.condensedLoggingString().utf8().data(), objectStore.info().condensedLoggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didCreateIndexOnServer, &IDBTransaction::createIndexOnServer, info));
</span><span class="cx">
</span><span class="cx"> return std::make_unique<IDBIndex>(*scriptExecutionContext(), info, objectStore);
</span><span class="lines">@@ -774,6 +780,8 @@
</span><span class="cx">
</span><span class="cx"> uint64_t objectStoreIdentifier = index.objectStore().info().identifier();
</span><span class="cx"> uint64_t indexIdentifier = index.info().identifier();
</span><ins>+
+ LOG(IndexedDBOperations, "IDB rename index operation: %s to %s under object store %" PRIu64, index.info().condensedLoggingString().utf8().data(), newName.utf8().data(), index.info().objectStoreIdentifier());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameIndexOnServer, &IDBTransaction::renameIndexOnServer, objectStoreIdentifier, indexIdentifier, newName));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -825,6 +833,7 @@
</span><span class="cx"> auto request = IDBRequest::create(*scriptExecutionContext(), cursor.get(), *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB open cursor operation: %s", cursor->info().loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didOpenCursorOnServer, &IDBTransaction::openCursorOnServer, cursor->info()));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -855,6 +864,7 @@
</span><span class="cx">
</span><span class="cx"> addRequest(*cursor.request());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB iterate cursor operation: %s", data.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, *cursor.request(), &IDBTransaction::didIterateCursorOnServer, &IDBTransaction::iterateCursorOnServer, data));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -888,6 +898,7 @@
</span><span class="cx">
</span><span class="cx"> IDBGetAllRecordsData getAllRecordsData { keyRangeData, getAllType, count, objectStore.info().identifier(), 0 };
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB get all object store records operation: %s", getAllRecordsData.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetAllRecordsOnServer, &IDBTransaction::getAllRecordsOnServer, getAllRecordsData));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -906,6 +917,7 @@
</span><span class="cx">
</span><span class="cx"> IDBGetAllRecordsData getAllRecordsData { keyRangeData, getAllType, count, index.objectStore().info().identifier(), index.info().identifier() };
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB get all index records operation: %s", getAllRecordsData.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetAllRecordsOnServer, &IDBTransaction::getAllRecordsOnServer, getAllRecordsData));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -958,6 +970,7 @@
</span><span class="cx"> auto request = IDBRequest::createObjectStoreGet(*scriptExecutionContext(), objectStore, type, *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB get record operation: %s", getRecordData.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -992,6 +1005,8 @@
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><span class="cx"> IDBGetRecordData getRecordData = { range, IDBGetRecordDataType::KeyAndValue };
</span><ins>+
+ LOG(IndexedDBOperations, "IDB get index record operation: %s", getRecordData.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -1050,6 +1065,7 @@
</span><span class="cx"> auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB object store count operation: %s, range %s", objectStore.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetCountOnServer, &IDBTransaction::getCountOnServer, range));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -1067,6 +1083,7 @@
</span><span class="cx"> auto request = IDBRequest::create(*scriptExecutionContext(), index, *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB index count operation: %s, range %s", index.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetCountOnServer, &IDBTransaction::getCountOnServer, range));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -1101,6 +1118,7 @@
</span><span class="cx"> auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB delete record operation: %s, range %s", objectStore.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didDeleteRecordOnServer, &IDBTransaction::deleteRecordOnServer, range));
</span><span class="cx"> return request;
</span><span class="cx"> }
</span><span class="lines">@@ -1134,6 +1152,8 @@
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><span class="cx"> uint64_t objectStoreIdentifier = objectStore.info().identifier();
</span><ins>+
+ LOG(IndexedDBOperations, "IDB clear object store operation: %s", objectStore.info().condensedLoggingString().utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didClearObjectStoreOnServer, &IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -1169,6 +1189,7 @@
</span><span class="cx"> auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
</span><span class="cx"> addRequest(request.get());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB putOrAdd operation: %s", key ? key->loggingString().utf8().data() : "<null key>");
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didPutOrAddOnServer, &IDBTransaction::putOrAddOnServer, key, &value, overwriteMode));
</span><span class="cx">
</span><span class="cx"> return request;
</span><span class="lines">@@ -1252,6 +1273,7 @@
</span><span class="cx"> m_deletedObjectStores.set(identifier, WTFMove(objectStore));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB delete object store operation: %s", objectStoreName.utf8().data());
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didDeleteObjectStoreOnServer, &IDBTransaction::deleteObjectStoreOnServer, objectStoreName));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1277,6 +1299,7 @@
</span><span class="cx"> ASSERT(currentThread() == m_database->originThreadID());
</span><span class="cx"> ASSERT(isVersionChange());
</span><span class="cx">
</span><ins>+ LOG(IndexedDBOperations, "IDB delete index operation: %s (%" PRIu64 ")", indexName.utf8().data(), objectStoreIdentifier);
</ins><span class="cx"> scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didDeleteIndexOnServer, &IDBTransaction::deleteIndexOnServer, objectStoreIdentifier, indexName));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -99,6 +99,16 @@
</span><span class="cx"> return { m_cursorIdentifier.isolatedCopy(), m_transactionIdentifier.isolatedCopy(), m_objectStoreIdentifier, m_sourceIdentifier, m_range.isolatedCopy(), m_source, m_direction, m_type };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+String IDBCursorInfo::loggingString() const
+{
+ if (m_source == IndexedDB::CursorSource::Index)
+ return String::format("<Crsr: Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+
+ return String::format("<Crsr: OS %" PRIu64 ", tx %s>", m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBCursorInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -70,6 +70,10 @@
</span><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, IDBCursorInfo&);
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+ String loggingString() const;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> IDBCursorInfo(IDBTransaction&, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
</span><span class="cx"> IDBCursorInfo(IDBTransaction&, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetAllRecordsDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -37,6 +37,15 @@
</span><span class="cx"> return { keyRangeData.isolatedCopy(), getAllType, count, objectStoreIdentifier, indexIdentifier };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+String IDBGetAllRecordsData::loggingString() const
+{
+ if (indexIdentifier)
+ return String::format("<GetAllRecords: Idx %" PRIu64 ", OS %" PRIu64 ", %s, range %s>", indexIdentifier, objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
+ return String::format("<GetAllRecords: OS %" PRIu64 ", %s, range %s>", objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetAllRecordsDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -46,6 +46,10 @@
</span><span class="cx">
</span><span class="cx"> IDBGetAllRecordsData isolatedCopy() const;
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+ String loggingString() const;
+#endif
+
</ins><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, IDBGetAllRecordsData&);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -37,6 +37,13 @@
</span><span class="cx"> return { keyRangeData.isolatedCopy(), type };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+String IDBGetRecordData::loggingString() const
+{
+ return String::format("<GetRecord: %s %s>", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", keyRangeData.loggingString().utf8().data());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBGetRecordDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -42,6 +42,10 @@
</span><span class="cx">
</span><span class="cx"> IDBGetRecordData isolatedCopy() const;
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+ String loggingString() const;
+#endif
+
</ins><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, IDBGetRecordData&);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIndexInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -58,6 +58,11 @@
</span><span class="cx">
</span><span class="cx"> return makeString(indentString, "Index: ", m_name, String::format(" (%" PRIu64 ") \n", m_identifier));
</span><span class="cx"> }
</span><ins>+
+String IDBIndexInfo::condensedLoggingString() const
+{
+ return String::format("<Idx: %s (%" PRIu64 "), OS (%" PRIu64 ")>", m_name.utf8().data(), m_identifier, m_objectStoreIdentifier);
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIndexInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx">
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="cx"> String loggingString(int indent = 0) const;
</span><ins>+ String condensedLoggingString() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // FIXME: Remove the need for this.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -35,6 +35,13 @@
</span><span class="cx"> return { keyData.isolatedCopy(), primaryKeyData.isolatedCopy(), count };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+String IDBIterateCursorData::loggingString() const
+{
+ return String::format("<Itr8Crsr: key %s, primaryKey %s, count %u", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count);
+}
+#endif
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBIterateCursorDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -38,6 +38,10 @@
</span><span class="cx">
</span><span class="cx"> IDBIterateCursorData isolatedCopy() const;
</span><span class="cx">
</span><ins>+#if !LOG_DISABLED
+ String loggingString() const;
+#endif
+
</ins><span class="cx"> template<class Encoder> void encode(Encoder&) const;
</span><span class="cx"> template<class Decoder> static bool decode(Decoder&, IDBIterateCursorData&);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -150,6 +150,12 @@
</span><span class="cx">
</span><span class="cx"> return builder.toString();
</span><span class="cx"> }
</span><ins>+
+String IDBObjectStoreInfo::condensedLoggingString() const
+{
+ return String::format("<OS: %s (%" PRIu64 ")>", m_name.utf8().data(), m_identifier);
+}
+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbsharedIDBObjectStoreInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx">
</span><span class="cx"> #if !LOG_DISABLED
</span><span class="cx"> String loggingString(int indent = 0) const;
</span><ins>+ String condensedLoggingString() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLoggingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Logging.h (209872 => 209873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Logging.h        2016-12-15 22:07:10 UTC (rev 209872)
+++ trunk/Source/WebCore/platform/Logging.h        2016-12-15 22:08:26 UTC (rev 209873)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx"> M(IconDatabase) \
</span><span class="cx"> M(Images) \
</span><span class="cx"> M(IndexedDB) \
</span><ins>+ M(IndexedDBOperations) \
</ins><span class="cx"> M(Layers) \
</span><span class="cx"> M(Layout) \
</span><span class="cx"> M(Loading) \
</span></span></pre>
</div>
</div>
</body>
</html>