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

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

Issue 1182233003: IndexedDB: Replace use of DOMError with DOMException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 3 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.h ('k') | Source/modules/indexeddb/IDBRequest.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBRequest.cpp
diff --git a/Source/modules/indexeddb/IDBRequest.cpp b/Source/modules/indexeddb/IDBRequest.cpp
index c0109980da091fbdee3d8104660f31fdec62ad40..f7f5dc782f6dc5576e9e1cb709d945119c05d755 100644
--- a/Source/modules/indexeddb/IDBRequest.cpp
+++ b/Source/modules/indexeddb/IDBRequest.cpp
@@ -33,6 +33,8 @@
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
#include "bindings/modules/v8/ToV8ForModules.h"
#include "bindings/modules/v8/V8BindingForModules.h"
+#include "core/dom/DOMException.h"
+#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/events/EventQueue.h"
#include "modules/IndexedDBNames.h"
@@ -98,7 +100,7 @@ ScriptValue IDBRequest::result(ExceptionState& exceptionState)
return value;
}
-DOMError* IDBRequest::error(ExceptionState& exceptionState) const
+DOMException* IDBRequest::error(ExceptionState& exceptionState) const
{
if (m_readyState != DONE) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::requestNotFinishedErrorMessage);
@@ -143,7 +145,7 @@ void IDBRequest::abort()
m_error.clear();
m_result.clear();
- onError(DOMError::create(AbortError, "The transaction was aborted, so the request cannot be fulfilled."));
+ onError(DOMException::create(AbortError, "The transaction was aborted, so the request cannot be fulfilled."));
m_requestAborted = true;
}
@@ -220,7 +222,7 @@ bool IDBRequest::shouldEnqueueEvent() const
return true;
}
-void IDBRequest::onError(DOMError* error)
+void IDBRequest::onError(DOMException* error)
{
IDB_TRACE("IDBRequest::onError()");
if (!shouldEnqueueEvent())
@@ -488,7 +490,7 @@ bool IDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event)
void IDBRequest::uncaughtExceptionInEventHandler()
{
if (m_transaction && !m_requestAborted) {
- m_transaction->setError(DOMError::create(AbortError, "Uncaught exception in event handler."));
+ m_transaction->setError(DOMException::create(AbortError, "Uncaught exception in event handler."));
m_transaction->abort(IGNORE_EXCEPTION);
}
}
« no previous file with comments | « Source/modules/indexeddb/IDBRequest.h ('k') | Source/modules/indexeddb/IDBRequest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698