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

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

Issue 18398002: Remove IDBNotFoundError ExceptionCode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge Created 7 years, 6 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
Index: Source/modules/indexeddb/IDBTransaction.cpp
diff --git a/Source/modules/indexeddb/IDBTransaction.cpp b/Source/modules/indexeddb/IDBTransaction.cpp
index 5923506dc481db1b2dfff69ae0a577dca768bdc3..7f408a7be6376abbec2a7c60a2b1577c01817db8 100644
--- a/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/Source/modules/indexeddb/IDBTransaction.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "modules/indexeddb/IDBTransaction.h"
+#include "bindings/v8/ExceptionState.h"
#include "core/dom/DOMError.h"
#include "core/dom/EventQueue.h"
#include "core/dom/ExceptionCode.h"
@@ -136,10 +137,10 @@ void IDBTransaction::setError(PassRefPtr<DOMError> error)
}
}
-PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, ExceptionCode& ec)
+PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, ExceptionState& es)
{
if (m_state == Finished) {
- ec = INVALID_STATE_ERR;
+ es.throwDOMException(INVALID_STATE_ERR);
return 0;
}
@@ -148,16 +149,16 @@ PassRefPtr<IDBObjectStore> IDBTransaction::objectStore(const String& name, Excep
return it->value;
if (!isVersionChange() && !m_objectStoreNames.contains(name)) {
- // FIXME: Should use (NotFoundError, "...").
- ec = IDBNotFoundError;
+ // FIXME: Should use constant
+ es.throwDOMException(NOT_FOUND_ERR, "An operation failed because the requested database object could not be found.");
return 0;
}
int64_t objectStoreId = m_database->findObjectStoreId(name);
if (objectStoreId == IDBObjectStoreMetadata::InvalidId) {
ASSERT(isVersionChange());
- // FIXME: Should use (NotFoundError, "...").
- ec = IDBNotFoundError;
+ // FIXME: Should use constant
+ es.throwDOMException(NOT_FOUND_ERR, "An operation failed because the requested database object could not be found.");
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698