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

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

Issue 1364823002: IndexedDB: Replace use of DOMError with DOMException (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop [Measure] where done Created 5 years, 1 month 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: third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
index c0109980da091fbdee3d8104660f31fdec62ad40..f7f5dc782f6dc5576e9e1cb709d945119c05d755 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
+++ b/third_party/WebKit/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 | « third_party/WebKit/Source/modules/indexeddb/IDBRequest.h ('k') | third_party/WebKit/Source/modules/indexeddb/IDBRequest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698