Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: Source/modules/indexeddb/IDBTransaction.cpp

Issue 18580013: IndexedDB: Make DOMException messages more useful. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Specific message for inactive transactions Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/indexeddb/IDBRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBTransaction.cpp
diff --git a/Source/modules/indexeddb/IDBTransaction.cpp b/Source/modules/indexeddb/IDBTransaction.cpp
index f5c4c8d884ea67720fd038f00449e61e3b615e3e..706e3a8115ba7f18f80fa8ab6b09e31ba2415b7b 100644
--- a/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/Source/modules/indexeddb/IDBTransaction.cpp
@@ -139,7 +139,7 @@ void IDBTransaction::setError(PassRefPtr<DOMError> error)
PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, ExceptionState& es)
{
if (m_state == Finished) {
- es.throwDOMException(InvalidStateError);
+ es.throwDOMException(InvalidStateError, IDBDatabase::transactionFinishedErrorMessage);
return 0;
}
@@ -148,14 +148,14 @@ PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, Excep
return it->value;
if (!isVersionChange() && !m_objectStoreNames.contains(name)) {
- es.throwDOMException(NotFoundError, IDBDatabase::notFoundErrorMessage);
+ es.throwDOMException(NotFoundError, IDBDatabase::noSuchObjectStoreErrorMessage);
return 0;
}
int64_t objectStoreId = m_database->findObjectStoreId(name);
if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
ASSERT(isVersionChange());
- es.throwDOMException(NotFoundError, IDBDatabase::notFoundErrorMessage);
+ es.throwDOMException(NotFoundError, IDBDatabase::noSuchObjectStoreErrorMessage);
return 0;
}
@@ -204,7 +204,7 @@ void IDBTransaction::setActive(bool active)
void IDBTransaction::abort(ExceptionState& es)
{
if (m_state == Finishing || m_state == Finished) {
- es.throwDOMException(InvalidStateError);
+ es.throwDOMException(InvalidStateError, IDBDatabase::transactionFinishedErrorMessage);
return;
}
« no previous file with comments | « Source/modules/indexeddb/IDBRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698