Title: [146527] trunk/Source/WebCore
Revision
146527
Author
jsb...@chromium.org
Date
2013-03-21 14:53:35 -0700 (Thu, 21 Mar 2013)

Log Message

IndexedDB: Ensure all API methods have IDB_TRACE macros
https://bugs.webkit.org/show_bug.cgi?id=112963

Reviewed by Tony Chang.

Anntotate methods and callbacks that weren't already annotated
with IDB_TRACE macros to assist in debugging, e.g. when using
the chromium port's chrome://tracing visualization.

No new tests - just harmless diagnostic sprinkles.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
(WebCore::IDBDatabase::deleteObjectStore): ...and here.
(WebCore::IDBDatabase::transaction): ...etc.
(WebCore::IDBDatabase::close):
(WebCore::IDBDatabase::onVersionChange):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::getDatabaseNames):
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::getDatabaseNames):
(WebCore::IDBFactoryBackendImpl::deleteDatabase):
(WebCore::IDBFactoryBackendImpl::open):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onBlocked):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (146526 => 146527)


--- trunk/Source/WebCore/ChangeLog	2013-03-21 21:52:15 UTC (rev 146526)
+++ trunk/Source/WebCore/ChangeLog	2013-03-21 21:53:35 UTC (rev 146527)
@@ -1,3 +1,33 @@
+2013-03-21  Joshua Bell  <jsb...@chromium.org>
+
+        IndexedDB: Ensure all API methods have IDB_TRACE macros
+        https://bugs.webkit.org/show_bug.cgi?id=112963
+
+        Reviewed by Tony Chang.
+
+        Anntotate methods and callbacks that weren't already annotated
+        with IDB_TRACE macros to assist in debugging, e.g. when using
+        the chromium port's chrome://tracing visualization.
+
+        No new tests - just harmless diagnostic sprinkles.
+
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
+        (WebCore::IDBDatabase::deleteObjectStore): ...and here.
+        (WebCore::IDBDatabase::transaction): ...etc.
+        (WebCore::IDBDatabase::close):
+        (WebCore::IDBDatabase::onVersionChange):
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::IDBFactory::getDatabaseNames):
+        (WebCore::IDBFactory::open):
+        (WebCore::IDBFactory::deleteDatabase):
+        * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
+        (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
+        (WebCore::IDBFactoryBackendImpl::deleteDatabase):
+        (WebCore::IDBFactoryBackendImpl::open):
+        * Modules/indexeddb/IDBOpenDBRequest.cpp:
+        (WebCore::IDBOpenDBRequest::onBlocked):
+
 2013-03-21  Christian Biesinger  <cbiesin...@chromium.org>
 
         http://trac.webkit.org/changeset/146375 causing CrOS crashes

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (146526 => 146527)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2013-03-21 21:52:15 UTC (rev 146526)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp	2013-03-21 21:53:35 UTC (rev 146527)
@@ -159,6 +159,7 @@
 
 PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBDatabase::createObjectStore");
     HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBCreateObjectStoreCall, IDBMethodsMax);
     if (!m_versionChangeTransaction) {
         ec = IDBDatabaseException::InvalidStateError;
@@ -198,6 +199,7 @@
 
 void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBDatabase::deleteObjectStore");
     HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteObjectStoreCall, IDBMethodsMax);
     if (!m_versionChangeTransaction) {
         ec = IDBDatabaseException::InvalidStateError;
@@ -221,6 +223,7 @@
 
 PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBDatabase::transaction");
     HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBTransactionCall, IDBMethodsMax);
     if (!scope.size()) {
         ec = IDBDatabaseException::InvalidAccessError;
@@ -269,6 +272,7 @@
 
 void IDBDatabase::close()
 {
+    IDB_TRACE("IDBDatabase::close");
     if (m_closePending)
         return;
 
@@ -301,6 +305,7 @@
 
 void IDBDatabase::onVersionChange(int64_t oldVersion, int64_t newVersion)
 {
+    IDB_TRACE("IDBDatabase::onVersionChange");
     if (m_contextStopped || !scriptExecutionContext())
         return;
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (146526 => 146527)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2013-03-21 21:52:15 UTC (rev 146526)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp	2013-03-21 21:53:35 UTC (rev 146527)
@@ -45,6 +45,7 @@
 #include "IDBKey.h"
 #include "IDBKeyRange.h"
 #include "IDBOpenDBRequest.h"
+#include "IDBTracing.h"
 #include "Page.h"
 #include "PageGroup.h"
 #include "SecurityOrigin.h"
@@ -99,6 +100,7 @@
 
 PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext* context, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBFactory::getDatabaseNames");
     if (!isContextValid(context))
         return 0;
     if (!context->securityOrigin()->canAccessDatabase(context->topOrigin())) {
@@ -113,6 +115,7 @@
 
 PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, unsigned long long version, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBFactory::open");
     if (!version) {
         ec = TypeError;
         return 0;
@@ -144,11 +147,13 @@
 
 PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBFactory::open");
     return openInternal(context, name, IDBDatabaseMetadata::NoIntVersion, ec);
 }
 
 PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
 {
+    IDB_TRACE("IDBFactory::deleteDatabase");
     HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteDatabaseCall, IDBMethodsMax);
     if (name.isNull()) {
         ec = TypeError;

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp (146526 => 146527)


--- trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp	2013-03-21 21:52:15 UTC (rev 146526)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp	2013-03-21 21:53:35 UTC (rev 146527)
@@ -33,6 +33,7 @@
 #include "IDBBackingStore.h"
 #include "IDBDatabaseBackendImpl.h"
 #include "IDBDatabaseException.h"
+#include "IDBTracing.h"
 #include "IDBTransactionCoordinator.h"
 #include "SecurityOrigin.h"
 #include <wtf/UnusedParam.h>
@@ -82,6 +83,7 @@
 
 void IDBFactoryBackendImpl::getDatabaseNames(PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> securityOrigin, ScriptExecutionContext*, const String& dataDirectory)
 {
+    IDB_TRACE("IDBFactoryBackendImpl::getDatabaseNames");
     RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, dataDirectory);
     if (!backingStore) {
         callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error opening backing store for indexedDB.webkitGetDatabaseNames."));
@@ -99,6 +101,7 @@
 
 void IDBFactoryBackendImpl::deleteDatabase(const String& name, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> securityOrigin, ScriptExecutionContext*, const String& dataDirectory)
 {
+    IDB_TRACE("IDBFactoryBackendImpl::deleteDatabase");
     const String uniqueIdentifier = computeUniqueIdentifier(name, securityOrigin.get());
 
     IDBDatabaseBackendMap::iterator it = m_databaseBackendMap.find(uniqueIdentifier);
@@ -147,6 +150,7 @@
 
 void IDBFactoryBackendImpl::open(const String& name, int64_t version, int64_t transactionId, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, PassRefPtr<SecurityOrigin> prpSecurityOrigin, ScriptExecutionContext*, const String& dataDirectory)
 {
+    IDB_TRACE("IDBFactoryBackendImpl::open");
     RefPtr<SecurityOrigin> securityOrigin = prpSecurityOrigin;
     const String uniqueIdentifier = computeUniqueIdentifier(name, securityOrigin.get());
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp (146526 => 146527)


--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp	2013-03-21 21:52:15 UTC (rev 146526)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp	2013-03-21 21:53:35 UTC (rev 146527)
@@ -64,6 +64,7 @@
 
 void IDBOpenDBRequest::onBlocked(int64_t oldVersion)
 {
+    IDB_TRACE("IDBOpenDBRequest::onBlocked()");
     if (!shouldEnqueueEvent())
         return;
     RefPtr<IDBAny> newVersionAny = (m_version == IDBDatabaseMetadata::DefaultIntVersion) ? IDBAny::createNull() : IDBAny::create(m_version);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to