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

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

Issue 18398002: Remove IDBNotFoundError ExceptionCode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing include in code gen wich causes win compile failure 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
Index: Source/modules/indexeddb/IDBRequest.cpp
diff --git a/Source/modules/indexeddb/IDBRequest.cpp b/Source/modules/indexeddb/IDBRequest.cpp
index aed3d4bc921edc0308ff10da4606acd19e3347b5..b13b961ce7f4bb0b691d0b2dd8a9492b7792bb08 100644
--- a/Source/modules/indexeddb/IDBRequest.cpp
+++ b/Source/modules/indexeddb/IDBRequest.cpp
@@ -29,13 +29,13 @@
#include "config.h"
#include "modules/indexeddb/IDBRequest.h"
+#include "bindings/v8/ExceptionState.h"
+#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "bindings/v8/IDBBindingUtilities.h"
#include "core/dom/DOMError.h"
#include "core/dom/EventListener.h"
#include "core/dom/EventNames.h"
#include "core/dom/EventQueue.h"
-#include "core/dom/ExceptionCode.h"
-#include "core/dom/ExceptionCodePlaceholder.h"
#include "core/dom/ScriptExecutionContext.h"
#include "modules/indexeddb/IDBCursorBackendInterface.h"
#include "modules/indexeddb/IDBCursorWithValue.h"
@@ -92,19 +92,19 @@ IDBRequest::~IDBRequest()
ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !scriptExecutionContext());
}
-PassRefPtr<IDBAny> IDBRequest::result(ExceptionCode& ec) const
+PassRefPtr<IDBAny> IDBRequest::result(ExceptionState& es) const
{
if (m_readyState != DONE) {
- ec = InvalidStateError;
+ es.throwDOMException(InvalidStateError);
return 0;
}
return m_result;
}
-PassRefPtr<DOMError> IDBRequest::error(ExceptionCode& ec) const
+PassRefPtr<DOMError> IDBRequest::error(ExceptionState& es) const
{
if (m_readyState != DONE) {
- ec = InvalidStateError;
+ es.throwDOMException(InvalidStateError);
return 0;
}
return m_error;
@@ -488,7 +488,7 @@ bool IDBRequest::dispatchEvent(PassRefPtr<Event> event)
// doesn't receive a second error) and before deactivating (which might trigger commit).
if (event->type() == eventNames().errorEvent && dontPreventDefault && !m_requestAborted) {
m_transaction->setError(m_error);
- m_transaction->abort(IGNORE_EXCEPTION);
+ m_transaction->abort(IGNORE_EXCEPTION_STATE);
}
// If this was the last request in the transaction's list, it may commit here.
@@ -509,7 +509,7 @@ void IDBRequest::uncaughtExceptionInEventHandler()
{
if (m_transaction && !m_requestAborted) {
m_transaction->setError(DOMError::create(AbortError, "Uncaught exception in event handler."));
- m_transaction->abort(IGNORE_EXCEPTION);
+ m_transaction->abort(IGNORE_EXCEPTION_STATE);
}
}

Powered by Google App Engine
This is Rietveld 408576698