Add a new Logging Channel for IndexedDB Operation scheduling.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2016 22:08:26 +0000 (22:08 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2016 22:08:26 +0000 (22:08 +0000)
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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209873 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBFactory.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.h
Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.h
Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.h
Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.h
Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.h
Source/WebCore/platform/Logging.h

index 15d3d76..6cad4fd 100644 (file)
@@ -1,3 +1,65 @@
+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:
+
 2016-12-15  Konstantin Tokarev  <annulen@yandex.ru>
 
         Added missing override and final specifiers
index 3e7e611..fad585c 100644 (file)
@@ -203,6 +203,8 @@ ExceptionOr<Ref<IDBTransaction>> IDBDatabase::transaction(StringOrVectorOfString
     }
 
     auto info = IDBTransactionInfo::clientTransaction(m_connectionProxy.get(), objectStores, mode);
+
+    LOG(IndexedDBOperations, "IDB creating transaction: %s", info.loggingString().utf8().data());
     auto transaction = IDBTransaction::create(*this, info);
 
     LOG(IndexedDB, "IDBDatabase::transaction - Added active transaction %s", info.identifier().loggingString().utf8().data());
index 78c188b..5a4eca1 100644 (file)
@@ -100,6 +100,8 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::openInternal(ScriptExecutionConte
     if (!databaseIdentifier.isValid())
         return Exception { TypeError, ASCIILiteral("IDBFactory.open() called with an invalid security origin") };
 
+    LOG(IndexedDBOperations, "IDB opening database: %s %" PRIu64, name.utf8().data(), version);
+
     return m_connectionProxy->openDatabase(context, databaseIdentifier, version);
 }
 
@@ -119,6 +121,8 @@ ExceptionOr<Ref<IDBOpenDBRequest>> IDBFactory::deleteDatabase(ScriptExecutionCon
     if (!databaseIdentifier.isValid())
         return Exception { TypeError, ASCIILiteral("IDBFactory.deleteDatabase() called with an invalid security origin") };
 
+    LOG(IndexedDBOperations, "IDB deleting database: %s", name.utf8().data());
+
     return m_connectionProxy->deleteDatabase(context, databaseIdentifier);
 }
 
index 53d4486..f9aa03b 100644 (file)
@@ -249,6 +249,7 @@ void IDBTransaction::internalAbort()
     
     m_abortQueue.swap(m_pendingTransactionOperationQueue);
 
+    LOG(IndexedDBOperations, "IDB abort-on-server operation: Transaction %s", info().identifier().loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, nullptr, &IDBTransaction::abortOnServerAndCancelRequests));
 }
 
@@ -499,6 +500,7 @@ void IDBTransaction::commit()
     transitionedToFinishing(IndexedDB::TransactionState::Committing);
     m_database->willCommitTransaction(*this);
 
+    LOG(IndexedDBOperations, "IDB commit operation: Transaction %s", info().identifier().loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, nullptr, &IDBTransaction::commitOnServer));
 }
 
@@ -660,6 +662,7 @@ Ref<IDBObjectStore> IDBTransaction::createObjectStore(const IDBObjectStoreInfo&
     auto* rawObjectStore = objectStore.get();
     m_referencedObjectStores.set(info.name(), WTFMove(objectStore));
 
+    LOG(IndexedDBOperations, "IDB create object store operation: %s", info.condensedLoggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didCreateObjectStoreOnServer, &IDBTransaction::createObjectStoreOnServer, info));
 
     return *rawObjectStore;
@@ -696,6 +699,8 @@ void IDBTransaction::renameObjectStore(IDBObjectStore& objectStore, const String
     ASSERT(m_referencedObjectStores.get(objectStore.info().name()) == &objectStore);
 
     uint64_t objectStoreIdentifier = objectStore.info().identifier();
+
+    LOG(IndexedDBOperations, "IDB rename object store operation: %s to %s", objectStore.info().condensedLoggingString().utf8().data(), newName.utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameObjectStoreOnServer, &IDBTransaction::renameObjectStoreOnServer, objectStoreIdentifier, newName));
 
     m_referencedObjectStores.set(newName, m_referencedObjectStores.take(objectStore.info().name()));
@@ -726,6 +731,7 @@ std::unique_ptr<IDBIndex> IDBTransaction::createIndex(IDBObjectStore& objectStor
     if (!scriptExecutionContext())
         return nullptr;
 
+    LOG(IndexedDBOperations, "IDB create index operation: %s under object store %s", info.condensedLoggingString().utf8().data(), objectStore.info().condensedLoggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didCreateIndexOnServer, &IDBTransaction::createIndexOnServer, info));
 
     return std::make_unique<IDBIndex>(*scriptExecutionContext(), info, objectStore);
@@ -774,6 +780,8 @@ void IDBTransaction::renameIndex(IDBIndex& index, const String& newName)
 
     uint64_t objectStoreIdentifier = index.objectStore().info().identifier();
     uint64_t indexIdentifier = index.info().identifier();
+
+    LOG(IndexedDBOperations, "IDB rename index operation: %s to %s under object store %" PRIu64, index.info().condensedLoggingString().utf8().data(), newName.utf8().data(), index.info().objectStoreIdentifier());
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didRenameIndexOnServer, &IDBTransaction::renameIndexOnServer, objectStoreIdentifier, indexIdentifier, newName));
 }
 
@@ -825,6 +833,7 @@ Ref<IDBRequest> IDBTransaction::doRequestOpenCursor(ExecState& state, Ref<IDBCur
     auto request = IDBRequest::create(*scriptExecutionContext(), cursor.get(), *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB open cursor operation: %s", cursor->info().loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didOpenCursorOnServer, &IDBTransaction::openCursorOnServer, cursor->info()));
 
     return request;
@@ -855,6 +864,7 @@ void IDBTransaction::iterateCursor(IDBCursor& cursor, const IDBIterateCursorData
 
     addRequest(*cursor.request());
 
+    LOG(IndexedDBOperations, "IDB iterate cursor operation: %s", data.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, *cursor.request(), &IDBTransaction::didIterateCursorOnServer, &IDBTransaction::iterateCursorOnServer, data));
 }
 
@@ -888,6 +898,7 @@ Ref<IDBRequest> IDBTransaction::requestGetAllObjectStoreRecords(JSC::ExecState&
 
     IDBGetAllRecordsData getAllRecordsData { keyRangeData, getAllType, count, objectStore.info().identifier(), 0 };
 
+    LOG(IndexedDBOperations, "IDB get all object store records operation: %s", getAllRecordsData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetAllRecordsOnServer, &IDBTransaction::getAllRecordsOnServer, getAllRecordsData));
 
     return request;
@@ -906,6 +917,7 @@ Ref<IDBRequest> IDBTransaction::requestGetAllIndexRecords(JSC::ExecState& state,
 
     IDBGetAllRecordsData getAllRecordsData { keyRangeData, getAllType, count, index.objectStore().info().identifier(), index.info().identifier() };
 
+    LOG(IndexedDBOperations, "IDB get all index records operation: %s", getAllRecordsData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetAllRecordsOnServer, &IDBTransaction::getAllRecordsOnServer, getAllRecordsData));
 
     return request;
@@ -958,6 +970,7 @@ Ref<IDBRequest> IDBTransaction::requestGetRecord(ExecState& state, IDBObjectStor
     auto request = IDBRequest::createObjectStoreGet(*scriptExecutionContext(), objectStore, type, *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB get record operation: %s", getRecordData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
 
     return request;
@@ -992,6 +1005,8 @@ Ref<IDBRequest> IDBTransaction::requestIndexRecord(ExecState& state, IDBIndex& i
     addRequest(request.get());
 
     IDBGetRecordData getRecordData = { range, IDBGetRecordDataType::KeyAndValue };
+
+    LOG(IndexedDBOperations, "IDB get index record operation: %s", getRecordData.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetRecordOnServer, &IDBTransaction::getRecordOnServer, getRecordData));
 
     return request;
@@ -1050,6 +1065,7 @@ Ref<IDBRequest> IDBTransaction::requestCount(ExecState& state, IDBObjectStore& o
     auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB object store count operation: %s, range %s", objectStore.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetCountOnServer, &IDBTransaction::getCountOnServer, range));
 
     return request;
@@ -1067,6 +1083,7 @@ Ref<IDBRequest> IDBTransaction::requestCount(ExecState& state, IDBIndex& index,
     auto request = IDBRequest::create(*scriptExecutionContext(), index, *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB index count operation: %s, range %s", index.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didGetCountOnServer, &IDBTransaction::getCountOnServer, range));
 
     return request;
@@ -1101,6 +1118,7 @@ Ref<IDBRequest> IDBTransaction::requestDeleteRecord(ExecState& state, IDBObjectS
     auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB delete record operation: %s, range %s", objectStore.info().condensedLoggingString().utf8().data(), range.loggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didDeleteRecordOnServer, &IDBTransaction::deleteRecordOnServer, range));
     return request;
 }
@@ -1134,6 +1152,8 @@ Ref<IDBRequest> IDBTransaction::requestClearObjectStore(ExecState& state, IDBObj
     addRequest(request.get());
 
     uint64_t objectStoreIdentifier = objectStore.info().identifier();
+
+    LOG(IndexedDBOperations, "IDB clear object store operation: %s", objectStore.info().condensedLoggingString().utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didClearObjectStoreOnServer, &IDBTransaction::clearObjectStoreOnServer, objectStoreIdentifier));
 
     return request;
@@ -1169,6 +1189,7 @@ Ref<IDBRequest> IDBTransaction::requestPutOrAdd(ExecState& state, IDBObjectStore
     auto request = IDBRequest::create(*scriptExecutionContext(), objectStore, *this);
     addRequest(request.get());
 
+    LOG(IndexedDBOperations, "IDB putOrAdd operation: %s", key ? key->loggingString().utf8().data() : "<null key>");
     scheduleOperation(IDBClient::createTransactionOperation(*this, request.get(), &IDBTransaction::didPutOrAddOnServer, &IDBTransaction::putOrAddOnServer, key, &value, overwriteMode));
 
     return request;
@@ -1252,6 +1273,7 @@ void IDBTransaction::deleteObjectStore(const String& objectStoreName)
         m_deletedObjectStores.set(identifier, WTFMove(objectStore));
     }
 
+    LOG(IndexedDBOperations, "IDB delete object store operation: %s", objectStoreName.utf8().data());
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didDeleteObjectStoreOnServer, &IDBTransaction::deleteObjectStoreOnServer, objectStoreName));
 }
 
@@ -1277,6 +1299,7 @@ void IDBTransaction::deleteIndex(uint64_t objectStoreIdentifier, const String& i
     ASSERT(currentThread() == m_database->originThreadID());
     ASSERT(isVersionChange());
 
+    LOG(IndexedDBOperations, "IDB delete index operation: %s (%" PRIu64 ")", indexName.utf8().data(), objectStoreIdentifier);
     scheduleOperation(IDBClient::createTransactionOperation(*this, &IDBTransaction::didDeleteIndexOnServer, &IDBTransaction::deleteIndexOnServer, objectStoreIdentifier, indexName));
 }
 
index f18e0dc..a2457db 100644 (file)
@@ -99,6 +99,16 @@ IDBCursorInfo IDBCursorInfo::isolatedCopy() const
     return { m_cursorIdentifier.isolatedCopy(), m_transactionIdentifier.isolatedCopy(), m_objectStoreIdentifier, m_sourceIdentifier, m_range.isolatedCopy(), m_source, m_direction, m_type };
 }
 
+#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
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index a05f3e8..84b439b 100644 (file)
@@ -70,6 +70,10 @@ public:
     template<class Encoder> void encode(Encoder&) const;
     template<class Decoder> static bool decode(Decoder&, IDBCursorInfo&);
 
+#if !LOG_DISABLED
+    String loggingString() const;
+#endif
+
 private:
     IDBCursorInfo(IDBTransaction&, uint64_t objectStoreIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
     IDBCursorInfo(IDBTransaction&, uint64_t objectStoreIdentifier, uint64_t indexIdentifier, const IDBKeyRangeData&, IndexedDB::CursorDirection, IndexedDB::CursorType);
index 6651bc2..92b6b92 100644 (file)
@@ -37,6 +37,15 @@ IDBGetAllRecordsData IDBGetAllRecordsData::isolatedCopy() const
     return { keyRangeData.isolatedCopy(), getAllType, count, objectStoreIdentifier, indexIdentifier };
 }
 
+#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
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 1163483..e9b4598 100644 (file)
@@ -46,6 +46,10 @@ struct IDBGetAllRecordsData {
 
     IDBGetAllRecordsData isolatedCopy() const;
 
+#if !LOG_DISABLED
+    String loggingString() const;
+#endif
+
     template<class Encoder> void encode(Encoder&) const;
     template<class Decoder> static bool decode(Decoder&, IDBGetAllRecordsData&);
 };
index 6884f2b..d789626 100644 (file)
@@ -37,6 +37,13 @@ IDBGetRecordData IDBGetRecordData::isolatedCopy() const
     return { keyRangeData.isolatedCopy(), type };
 }
 
+#if !LOG_DISABLED
+String IDBGetRecordData::loggingString() const
+{
+    return String::format("<GetRecord: %s %s>", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", keyRangeData.loggingString().utf8().data());
+}
+#endif
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 6182042..e82ab54 100644 (file)
@@ -42,6 +42,10 @@ struct IDBGetRecordData {
 
     IDBGetRecordData isolatedCopy() const;
 
+#if !LOG_DISABLED
+    String loggingString() const;
+#endif
+
     template<class Encoder> void encode(Encoder&) const;
     template<class Decoder> static bool decode(Decoder&, IDBGetRecordData&);
 };
index 468c9b8..6c44e76 100644 (file)
@@ -58,6 +58,11 @@ String IDBIndexInfo::loggingString(int indent) const
 
     return makeString(indentString, "Index: ", m_name, String::format(" (%" PRIu64 ") \n", m_identifier));
 }
+
+String IDBIndexInfo::condensedLoggingString() const
+{
+    return String::format("<Idx: %s (%" PRIu64 "), OS (%" PRIu64 ")>", m_name.utf8().data(), m_identifier, m_objectStoreIdentifier);
+}
 #endif
 
 } // namespace WebCore
index c4fc4ba..1e37417 100644 (file)
@@ -53,6 +53,7 @@ public:
 
 #if !LOG_DISABLED
     String loggingString(int indent = 0) const;
+    String condensedLoggingString() const;
 #endif
 
     // FIXME: Remove the need for this.
index b865429..76c4d4d 100644 (file)
@@ -35,6 +35,13 @@ IDBIterateCursorData IDBIterateCursorData::isolatedCopy() const
     return { keyData.isolatedCopy(), primaryKeyData.isolatedCopy(), count };
 }
 
+#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
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
index 6b047e9..609f748 100644 (file)
@@ -38,6 +38,10 @@ struct IDBIterateCursorData {
 
     IDBIterateCursorData isolatedCopy() const;
 
+#if !LOG_DISABLED
+    String loggingString() const;
+#endif
+
     template<class Encoder> void encode(Encoder&) const;
     template<class Decoder> static bool decode(Decoder&, IDBIterateCursorData&);
 };
index acdea1e..b0075fe 100644 (file)
@@ -150,6 +150,12 @@ String IDBObjectStoreInfo::loggingString(int indent) const
 
     return builder.toString();
 }
+
+String IDBObjectStoreInfo::condensedLoggingString() const
+{
+    return String::format("<OS: %s (%" PRIu64 ")>", m_name.utf8().data(), m_identifier);
+}
+
 #endif
 
 } // namespace WebCore
index d7205f2..0b85259 100644 (file)
@@ -67,6 +67,7 @@ public:
 
 #if !LOG_DISABLED
     String loggingString(int indent = 0) const;
+    String condensedLoggingString() const;
 #endif
 
 private:
index f3409d1..1d14f35 100644 (file)
@@ -55,6 +55,7 @@ namespace WebCore {
     M(IconDatabase) \
     M(Images) \
     M(IndexedDB) \
+    M(IndexedDBOperations) \
     M(Layers) \
     M(Layout) \
     M(Loading) \