Commit 1367e453 authored by beidson@apple.com's avatar beidson@apple.com

Remove IDBTracing.h.

https://bugs.webkit.org/show_bug.cgi?id=122118

Reviewed by Alexey Proskuryakov.

Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.

* GNUmakefile.list.am:

* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBTracing.h: Removed.
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/IDBBindingUtilities.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c24920f7
2013-09-30 Brady Eidson <beidson@apple.com>
Remove IDBTracing.h.
https://bugs.webkit.org/show_bug.cgi?id=122118
Reviewed by Alexey Proskuryakov.
Global replace of "IDB_TRACE" with "LOG(StorageAPI)", and remove all notions of this header.
* GNUmakefile.list.am:
* Modules/indexeddb/IDBCursor.cpp:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/IDBIndex.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBTracing.h: Removed.
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/IDBBindingUtilities.cpp:
2013-09-30 Brent Fulgham <bfulgham@apple.com>
[Windows] Build fix after r156622. Build RenderLayerModelObject.cpp in a separate compilation unit
......@@ -1939,7 +1939,6 @@ webcore_modules_sources += \
Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h \
Source/WebCore/Modules/indexeddb/IDBRequest.cpp \
Source/WebCore/Modules/indexeddb/IDBRequest.h \
Source/WebCore/Modules/indexeddb/IDBTracing.h \
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp \
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h \
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp \
......
......@@ -35,8 +35,8 @@
#include "IDBKey.h"
#include "IDBObjectStore.h"
#include "IDBRequest.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "Logging.h"
#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include <limits>
......@@ -94,25 +94,25 @@ IDBCursor::~IDBCursor()
const String& IDBCursor::direction() const
{
IDB_TRACE("IDBCursor::direction");
LOG(StorageAPI, "IDBCursor::direction");
return directionToString(m_direction);
}
const ScriptValue& IDBCursor::key() const
{
IDB_TRACE("IDBCursor::key");
LOG(StorageAPI, "IDBCursor::key");
return m_currentKeyValue;
}
const ScriptValue& IDBCursor::primaryKey() const
{
IDB_TRACE("IDBCursor::primaryKey");
LOG(StorageAPI, "IDBCursor::primaryKey");
return m_currentPrimaryKeyValue;
}
const ScriptValue& IDBCursor::value() const
{
IDB_TRACE("IDBCursor::value");
LOG(StorageAPI, "IDBCursor::value");
return m_currentValue;
}
......@@ -123,7 +123,7 @@ IDBAny* IDBCursor::source() const
PassRefPtr<IDBRequest> IDBCursor::update(JSC::ExecState* state, ScriptValue& value, ExceptionCode& ec)
{
IDB_TRACE("IDBCursor::update");
LOG(StorageAPI, "IDBCursor::update");
if (!m_gotValue || isKeyCursor()) {
ec = IDBDatabaseException::InvalidStateError;
......@@ -155,7 +155,7 @@ PassRefPtr<IDBRequest> IDBCursor::update(JSC::ExecState* state, ScriptValue& val
void IDBCursor::advance(unsigned long count, ExceptionCode& ec)
{
ec = 0;
IDB_TRACE("IDBCursor::advance");
LOG(StorageAPI, "IDBCursor::advance");
if (!m_gotValue) {
ec = IDBDatabaseException::InvalidStateError;
return;
......@@ -187,7 +187,7 @@ void IDBCursor::continueFunction(ScriptExecutionContext* context, const ScriptVa
void IDBCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionCode& ec)
{
ec = 0;
IDB_TRACE("IDBCursor::continue");
LOG(StorageAPI, "IDBCursor::continue");
if (key && !key->isValid()) {
ec = IDBDatabaseException::DataError;
return;
......@@ -229,7 +229,7 @@ void IDBCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionCode& ec)
PassRefPtr<IDBRequest> IDBCursor::deleteFunction(ScriptExecutionContext* context, ExceptionCode& ec)
{
ec = 0;
IDB_TRACE("IDBCursor::delete");
LOG(StorageAPI, "IDBCursor::delete");
if (!m_transaction->isActive()) {
ec = IDBDatabaseException::TransactionInactiveError;
return 0;
......
......@@ -41,9 +41,9 @@
#include "IDBIndex.h"
#include "IDBKeyPath.h"
#include "IDBObjectStore.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "IDBVersionChangeEvent.h"
#include "Logging.h"
#include "ScriptCallStack.h"
#include "ScriptExecutionContext.h"
#include <limits>
......@@ -156,7 +156,7 @@ PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co
PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement, ExceptionCode& ec)
{
IDB_TRACE("IDBDatabase::createObjectStore");
LOG(StorageAPI, "IDBDatabase::createObjectStore");
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBCreateObjectStoreCall, IDBMethodsMax);
if (!m_versionChangeTransaction) {
ec = IDBDatabaseException::InvalidStateError;
......@@ -196,7 +196,7 @@ PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co
void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec)
{
IDB_TRACE("IDBDatabase::deleteObjectStore");
LOG(StorageAPI, "IDBDatabase::deleteObjectStore");
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteObjectStoreCall, IDBMethodsMax);
if (!m_versionChangeTransaction) {
ec = IDBDatabaseException::InvalidStateError;
......@@ -220,7 +220,7 @@ void IDBDatabase::deleteObjectStore(const String& name, ExceptionCode& ec)
PassRefPtr<IDBTransaction> IDBDatabase::transaction(ScriptExecutionContext* context, const Vector<String>& scope, const String& modeString, ExceptionCode& ec)
{
IDB_TRACE("IDBDatabase::transaction");
LOG(StorageAPI, "IDBDatabase::transaction");
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBTransactionCall, IDBMethodsMax);
if (!scope.size()) {
ec = IDBDatabaseException::InvalidAccessError;
......@@ -269,7 +269,7 @@ void IDBDatabase::forceClose()
void IDBDatabase::close()
{
IDB_TRACE("IDBDatabase::close");
LOG(StorageAPI, "IDBDatabase::close");
if (m_closePending)
return;
......@@ -302,7 +302,7 @@ void IDBDatabase::closeConnection()
void IDBDatabase::onVersionChange(uint64_t oldVersion, uint64_t newVersion, IndexedDB::VersionNullness newVersionNullness)
{
IDB_TRACE("IDBDatabase::onVersionChange");
LOG(StorageAPI, "IDBDatabase::onVersionChange");
if (m_contextStopped || !scriptExecutionContext())
return;
......@@ -323,7 +323,7 @@ void IDBDatabase::enqueueEvent(PassRefPtr<Event> event)
bool IDBDatabase::dispatchEvent(PassRefPtr<Event> event)
{
IDB_TRACE("IDBDatabase::dispatchEvent");
LOG(StorageAPI, "IDBDatabase::dispatchEvent");
ASSERT(event->type() == eventNames().versionchangeEvent);
for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
if (m_enqueuedEvents[i].get() == event.get())
......
......@@ -90,8 +90,6 @@ public:
virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) = 0;
};
} // namespace WebCore
......
......@@ -45,7 +45,7 @@
#include "IDBKey.h"
#include "IDBKeyRange.h"
#include "IDBOpenDBRequest.h"
#include "IDBTracing.h"
#include "Logging.h"
#include "Page.h"
#include "PageGroup.h"
#include "SecurityOrigin.h"
......@@ -100,7 +100,7 @@ static String getIndexedDBDatabasePath(ScriptExecutionContext* context)
PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext* context, ExceptionCode& ec)
{
IDB_TRACE("IDBFactory::getDatabaseNames");
LOG(StorageAPI, "IDBFactory::getDatabaseNames");
if (!isContextValid(context))
return 0;
if (!context->securityOrigin()->canAccessDatabase(context->topOrigin())) {
......@@ -115,13 +115,13 @@ PassRefPtr<IDBRequest> IDBFactory::getDatabaseNames(ScriptExecutionContext* cont
PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
{
IDB_TRACE("IDBFactory::open");
LOG(StorageAPI, "IDBFactory::open");
return openInternal(context, name, 0, IndexedDB::NullVersion, ec);
}
PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, const String& name, unsigned long long version, ExceptionCode& ec)
{
IDB_TRACE("IDBFactory::open");
LOG(StorageAPI, "IDBFactory::open");
if (!version) {
ec = TypeError;
return 0;
......@@ -153,7 +153,7 @@ PassRefPtr<IDBOpenDBRequest> IDBFactory::openInternal(ScriptExecutionContext* co
PassRefPtr<IDBOpenDBRequest> IDBFactory::deleteDatabase(ScriptExecutionContext* context, const String& name, ExceptionCode& ec)
{
IDB_TRACE("IDBFactory::deleteDatabase");
LOG(StorageAPI, "IDBFactory::deleteDatabase");
HistogramSupport::histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBDeleteDatabaseCall, IDBMethodsMax);
if (name.isNull()) {
ec = TypeError;
......
......@@ -33,8 +33,8 @@
#include "IDBKeyRange.h"
#include "IDBObjectStore.h"
#include "IDBRequest.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "Logging.h"
#include "ScriptExecutionContext.h"
namespace WebCore {
......@@ -56,7 +56,7 @@ IDBIndex::~IDBIndex()
PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, const String& directionString, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::openCursor");
LOG(StorageAPI, "IDBIndex::openCursor");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -77,7 +77,7 @@ PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, Pas
PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, const ScriptValue& key, const String& direction, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::openCursor");
LOG(StorageAPI, "IDBIndex::openCursor");
RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
if (ec)
return 0;
......@@ -86,7 +86,7 @@ PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, con
PassRefPtr<IDBRequest> IDBIndex::count(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::count");
LOG(StorageAPI, "IDBIndex::count");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -102,7 +102,7 @@ PassRefPtr<IDBRequest> IDBIndex::count(ScriptExecutionContext* context, PassRefP
PassRefPtr<IDBRequest> IDBIndex::count(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::count");
LOG(StorageAPI, "IDBIndex::count");
RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
if (ec)
return 0;
......@@ -111,7 +111,7 @@ PassRefPtr<IDBRequest> IDBIndex::count(ScriptExecutionContext* context, const Sc
PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, const String& directionString, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::openKeyCursor");
LOG(StorageAPI, "IDBIndex::openKeyCursor");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -132,7 +132,7 @@ PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context,
PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context, const ScriptValue& key, const String& direction, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::openKeyCursor");
LOG(StorageAPI, "IDBIndex::openKeyCursor");
RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
if (ec)
return 0;
......@@ -141,7 +141,7 @@ PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context,
PassRefPtr<IDBRequest> IDBIndex::get(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::get");
LOG(StorageAPI, "IDBIndex::get");
RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
if (ec)
return 0;
......@@ -150,7 +150,7 @@ PassRefPtr<IDBRequest> IDBIndex::get(ScriptExecutionContext* context, const Scri
PassRefPtr<IDBRequest> IDBIndex::get(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::get");
LOG(StorageAPI, "IDBIndex::get");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -171,7 +171,7 @@ PassRefPtr<IDBRequest> IDBIndex::get(ScriptExecutionContext* context, PassRefPtr
PassRefPtr<IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::getKey");
LOG(StorageAPI, "IDBIndex::getKey");
RefPtr<IDBKeyRange> keyRange = IDBKeyRange::only(context, key, ec);
if (ec)
return 0;
......@@ -181,7 +181,7 @@ PassRefPtr<IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, const S
PassRefPtr<IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBIndex::getKey");
LOG(StorageAPI, "IDBIndex::getKey");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......
......@@ -38,8 +38,8 @@
#include "IDBKey.h"
#include "IDBKeyPath.h"
#include "IDBKeyRange.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "Logging.h"
#include "ScriptExecutionContext.h"
#include "SerializedScriptValue.h"
#include "SharedBuffer.h"
......@@ -58,7 +58,7 @@ IDBObjectStore::IDBObjectStore(const IDBObjectStoreMetadata& metadata, IDBTransa
PassRefPtr<DOMStringList> IDBObjectStore::indexNames() const
{
IDB_TRACE("IDBObjectStore::indexNames");
LOG(StorageAPI, "IDBObjectStore::indexNames");
RefPtr<DOMStringList> indexNames = DOMStringList::create();
for (IDBObjectStoreMetadata::IndexMap::const_iterator it = m_metadata.indexes.begin(); it != m_metadata.indexes.end(); ++it)
indexNames->append(it->value.name);
......@@ -68,7 +68,7 @@ PassRefPtr<DOMStringList> IDBObjectStore::indexNames() const
PassRefPtr<IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::get");
LOG(StorageAPI, "IDBObjectStore::get");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -119,25 +119,25 @@ static void generateIndexKeysForValue(DOMRequestState* requestState, const IDBIn
PassRefPtr<IDBRequest> IDBObjectStore::add(JSC::ExecState* state, ScriptValue& value, const ScriptValue& key, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::add");
LOG(StorageAPI, "IDBObjectStore::add");
return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, key, ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::add(JSC::ExecState* state, ScriptValue& value, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::add");
LOG(StorageAPI, "IDBObjectStore::add");
return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, ScriptValue& value, const ScriptValue& key, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::put");
LOG(StorageAPI, "IDBObjectStore::put");
return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, key, ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, ScriptValue& value, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::put");
LOG(StorageAPI, "IDBObjectStore::put");
return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
}
......@@ -239,7 +239,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode
PassRefPtr<IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::delete");
LOG(StorageAPI, "IDBObjectStore::delete");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -272,7 +272,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::deleteFunction(ScriptExecutionContext* co
PassRefPtr<IDBRequest> IDBObjectStore::clear(ScriptExecutionContext* context, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::clear");
LOG(StorageAPI, "IDBObjectStore::clear");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -374,7 +374,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context
PassRefPtr<IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::createIndex");
LOG(StorageAPI, "IDBObjectStore::createIndex");
if (!m_transaction->isVersionChange() || m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -430,7 +430,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context
PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::index");
LOG(StorageAPI, "IDBObjectStore::index");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -467,7 +467,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionCode& ec
void IDBObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::deleteIndex");
LOG(StorageAPI, "IDBObjectStore::deleteIndex");
if (!m_transaction->isVersionChange() || m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return;
......@@ -494,7 +494,7 @@ void IDBObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, const String& directionString, IDBDatabaseBackendInterface::TaskType taskType, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::openCursor");
LOG(StorageAPI, "IDBObjectStore::openCursor");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......@@ -524,7 +524,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* contex
PassRefPtr<IDBRequest> IDBObjectStore::count(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, ExceptionCode& ec)
{
IDB_TRACE("IDBObjectStore::count");
LOG(StorageAPI, "IDBObjectStore::count");
if (m_deleted) {
ec = IDBDatabaseException::InvalidStateError;
return 0;
......
......@@ -31,8 +31,8 @@
#include "IDBDatabase.h"
#include "IDBDatabaseCallbacksImpl.h"
#include "IDBPendingTransactionMonitor.h"
#include "IDBTracing.h"
#include "IDBVersionChangeEvent.h"
#include "Logging.h"
#include "ScriptExecutionContext.h"
namespace WebCore {
......@@ -65,7 +65,7 @@ EventTargetInterface IDBOpenDBRequest::eventTargetInterface() const
void IDBOpenDBRequest::onBlocked(uint64_t oldVersion)
{
IDB_TRACE("IDBOpenDBRequest::onBlocked()");
LOG(StorageAPI, "IDBOpenDBRequest::onBlocked()");
if (!shouldEnqueueEvent())
return;
......@@ -74,7 +74,7 @@ void IDBOpenDBRequest::onBlocked(uint64_t oldVersion)
void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDatabaseBackendInterface> prpDatabaseBackend, const IDBDatabaseMetadata& metadata)
{
IDB_TRACE("IDBOpenDBRequest::onUpgradeNeeded()");
LOG(StorageAPI, "IDBOpenDBRequest::onUpgradeNeeded()");
if (m_contextStopped || !scriptExecutionContext()) {
RefPtr<IDBDatabaseBackendInterface> db = prpDatabaseBackend;
db->abort(m_transactionId);
......@@ -106,7 +106,7 @@ void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDataba
void IDBOpenDBRequest::onSuccess(PassRefPtr<IDBDatabaseBackendInterface> prpBackend, const IDBDatabaseMetadata& metadata)
{
IDB_TRACE("IDBOpenDBRequest::onSuccess()");
LOG(StorageAPI, "IDBOpenDBRequest::onSuccess()");
if (!shouldEnqueueEvent())
return;
......
......@@ -41,8 +41,8 @@
#include "IDBCursorWithValue.h"
#include "IDBDatabase.h"
#include "IDBEventDispatcher.h"
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "Logging.h"
#include "ScriptExecutionContext.h"
namespace WebCore {
......@@ -249,7 +249,7 @@ bool IDBRequest::shouldEnqueueEvent() const
void IDBRequest::onError(PassRefPtr<IDBDatabaseError> error)
{
IDB_TRACE("IDBRequest::onError()");
LOG(StorageAPI, "IDBRequest::onError()");
if (!shouldEnqueueEvent())
return;
......@@ -267,7 +267,7 @@ static PassRefPtr<Event> createSuccessEvent()
void IDBRequest::onSuccess(PassRefPtr<DOMStringList> domStringList)
{
IDB_TRACE("IDBRequest::onSuccess(DOMStringList)");
LOG(StorageAPI, "IDBRequest::onSuccess(DOMStringList)");
if (!shouldEnqueueEvent())
return;
......@@ -277,7 +277,7 @@ void IDBRequest::onSuccess(PassRefPtr<DOMStringList> domStringList)
void IDBRequest::onSuccess(PassRefPtr<IDBCursorBackendInterface> backend, PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer> buffer)
{
IDB_TRACE("IDBRequest::onSuccess(IDBCursor)");
LOG(StorageAPI, "IDBRequest::onSuccess(IDBCursor)");
if (!shouldEnqueueEvent())
return;
......@@ -302,7 +302,7 @@ void IDBRequest::onSuccess(PassRefPtr<IDBCursorBackendInterface> backend, PassRe
void IDBRequest::onSuccess(PassRefPtr<IDBKey> idbKey)
{
IDB_TRACE("IDBRequest::onSuccess(IDBKey)");
LOG(StorageAPI, "IDBRequest::onSuccess(IDBKey)");
if (!shouldEnqueueEvent())
return;
......@@ -316,7 +316,7 @@ void IDBRequest::onSuccess(PassRefPtr<IDBKey> idbKey)
void IDBRequest::onSuccess(PassRefPtr<SharedBuffer> valueBuffer)
{
IDB_TRACE("IDBRequest::onSuccess(SharedBuffer)");
LOG(StorageAPI, "IDBRequest::onSuccess(SharedBuffer)");
if (!shouldEnqueueEvent())
return;
......@@ -340,7 +340,7 @@ static PassRefPtr<IDBObjectStore> effectiveObjectStore(PassRefPtr<IDBAny> source
void IDBRequest::onSuccess(PassRefPtr<SharedBuffer> valueBuffer, PassRefPtr<IDBKey> prpPrimaryKey, const IDBKeyPath& keyPath)
{
IDB_TRACE("IDBRequest::onSuccess(SharedBuffer, IDBKey, IDBKeyPath)");
LOG(StorageAPI, "IDBRequest::onSuccess(SharedBuffer, IDBKey, IDBKeyPath)");
if (!shouldEnqueueEvent())
return;
......@@ -362,7 +362,7 @@ void IDBRequest::onSuccess(PassRefPtr<SharedBuffer> valueBuffer, PassRefPtr<IDBK
void IDBRequest::onSuccess(int64_t value)
{
IDB_TRACE("IDBRequest::onSuccess(int64_t)");
LOG(StorageAPI, "IDBRequest::onSuccess(int64_t)");
if (!shouldEnqueueEvent())
return;
return onSuccessInternal(SerializedScriptValue::numberValue(value));
......@@ -370,7 +370,7 @@ void IDBRequest::onSuccess(int64_t value)
void IDBRequest::onSuccess()
{
IDB_TRACE("IDBRequest::onSuccess()");
LOG(StorageAPI, "IDBRequest::onSuccess()");
if (!shouldEnqueueEvent())
return;
return onSuccessInternal(SerializedScriptValue::undefinedValue());
......@@ -395,7 +395,7 @@ void IDBRequest::onSuccessInternal(const ScriptValue& value)
void IDBRequest::onSuccess(PassRefPtr<IDBKey> key, PassRefPtr<IDBKey> primaryKey, PassRefPtr<SharedBuffer> buffer)
{
IDB_TRACE("IDBRequest::onSuccess(key, primaryKey, value)");
LOG(StorageAPI, "IDBRequest::onSuccess(key, primaryKey, value)");
if (!shouldEnqueueEvent())
return;
......@@ -432,7 +432,7 @@ EventTargetInterface IDBRequest::eventTargetInterface() const
bool IDBRequest::dispatchEvent(PassRefPtr<Event> event)
{
IDB_TRACE("IDBRequest::dispatchEvent");
LOG(StorageAPI, "IDBRequest::dispatchEvent");
ASSERT(m_readyState == PENDING);
ASSERT(!m_contextStopped);
ASSERT(m_hasPendingActivity);
......
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef IDBTracing_h
#define IDBTracing_h
#if ENABLE(INDEXED_DATABASE)
#include "Logging.h"
#define IDB_TRACE(a) LOG(StorageAPI, a)
#endif // ENABLE(INDEXED_DATABASE)
#endif // IDBTracing_h
......@@ -38,7 +38,7 @@
#include "IDBObjectStore.h"
#include "IDBOpenDBRequest.h"
#include "IDBPendingTransactionMonitor.h"
#include "IDBTracing.h"