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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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/imagebitmap/ImageBitmapFactories.cpp ('k') | Source/modules/indexeddb/IDBFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBCursor.cpp
diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
index 364200007c6c57297ec7adb34204ad5e3db8b903..de7576665fd6c81fd2916d5111f68704c93d31c2 100644
--- a/Source/modules/indexeddb/IDBCursor.cpp
+++ b/Source/modules/indexeddb/IDBCursor.cpp
@@ -26,7 +26,6 @@
#include "config.h"
#include "modules/indexeddb/IDBCursor.h"
-#include "bindings/v8/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/IDBBindingUtilities.h"
#include "core/dom/ExceptionCode.h"
@@ -107,27 +106,27 @@ PassRefPtr<IDBRequest> IDBCursor::update(ScriptState* state, ScriptValue& value,
IDB_TRACE("IDBCursor::update");
if (!m_gotValue) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("update", "IDBCursor", IDBDatabase::noValueErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
return 0;
}
if (isKeyCursor()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("update", "IDBCursor", IDBDatabase::isKeyCursorErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::isKeyCursorErrorMessage);
return 0;
}
if (isDeleted()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("update", "IDBCursor", IDBDatabase::sourceDeletedErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
return 0;
}
if (m_transaction->isFinished()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("update", "IDBCursor", IDBDatabase::transactionFinishedErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
return 0;
}
if (!m_transaction->isActive()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("update", "IDBCursor", IDBDatabase::transactionInactiveErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return 0;
}
if (m_transaction->isReadOnly()) {
- exceptionState.throwDOMException(ReadOnlyError, ExceptionMessages::failedToExecute("update", "IDBCursor", "The record may not be updated inside a read-only transaction."));
+ exceptionState.throwDOMException(ReadOnlyError, "The record may not be updated inside a read-only transaction.");
return 0;
}
@@ -137,7 +136,7 @@ PassRefPtr<IDBRequest> IDBCursor::update(ScriptState* state, ScriptValue& value,
if (usesInLineKeys) {
RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(m_request->requestState(), value, keyPath);
if (!keyPathKey || !keyPathKey->isEqual(m_primaryKey.get())) {
- exceptionState.throwDOMException(DataError, ExceptionMessages::failedToExecute("update", "IDBCursor", "The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key."));
+ exceptionState.throwDOMException(DataError, "The effective object store of this cursor uses in-line keys and evaluating the key path of the value parameter results in a different value than the cursor's effective key.");
return 0;
}
}
@@ -149,20 +148,20 @@ void IDBCursor::advance(unsigned long count, ExceptionState& exceptionState)
{
IDB_TRACE("IDBCursor::advance");
if (!m_gotValue) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("advance", "IDBCursor", IDBDatabase::noValueErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
return;
}
if (isDeleted()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("advance", "IDBCursor", IDBDatabase::sourceDeletedErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
return;
}
if (m_transaction->isFinished()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("advance", "IDBCursor", IDBDatabase::transactionFinishedErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
return;
}
if (!m_transaction->isActive()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("advance", "IDBCursor", IDBDatabase::transactionInactiveErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return;
}
@@ -187,26 +186,26 @@ void IDBCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionState& excepti
{
IDB_TRACE("IDBCursor::continue");
if (key && !key->isValid()) {
- exceptionState.throwDOMException(DataError, ExceptionMessages::failedToExecute("continue", "IDBCursor", IDBDatabase::notValidKeyErrorMessage));
+ exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return;
}
if (m_transaction->isFinished()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("continue", "IDBCursor", IDBDatabase::transactionFinishedErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
return;
}
if (!m_transaction->isActive()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("continue", "IDBCursor", IDBDatabase::transactionInactiveErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return;
}
if (!m_gotValue) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("continue", "IDBCursor", IDBDatabase::noValueErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
return;
}
if (isDeleted()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("continue", "IDBCursor", IDBDatabase::sourceDeletedErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
return;
}
@@ -214,12 +213,12 @@ void IDBCursor::continueFunction(PassRefPtr<IDBKey> key, ExceptionState& excepti
ASSERT(m_key);
if (m_direction == IndexedDB::CursorNext || m_direction == IndexedDB::CursorNextNoDuplicate) {
if (!m_key->isLessThan(key.get())) {
- exceptionState.throwDOMException(DataError, ExceptionMessages::failedToExecute("continue", "IDBCursor", "The parameter is less than or equal to this cursor's position."));
+ exceptionState.throwDOMException(DataError, "The parameter is less than or equal to this cursor's position.");
return;
}
} else {
if (!key->isLessThan(m_key.get())) {
- exceptionState.throwDOMException(DataError, ExceptionMessages::failedToExecute("continue", "IDBCursor", "The parameter is greater than or equal to this cursor's position."));
+ exceptionState.throwDOMException(DataError, "The parameter is greater than or equal to this cursor's position.");
return;
}
}
@@ -236,28 +235,28 @@ PassRefPtr<IDBRequest> IDBCursor::deleteFunction(ExecutionContext* context, Exce
{
IDB_TRACE("IDBCursor::delete");
if (m_transaction->isFinished()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("delete", "IDBCursor", IDBDatabase::transactionFinishedErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
return 0;
}
if (!m_transaction->isActive()) {
- exceptionState.throwDOMException(TransactionInactiveError, ExceptionMessages::failedToExecute("delete", "IDBCursor", IDBDatabase::transactionInactiveErrorMessage));
+ exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return 0;
}
if (m_transaction->isReadOnly()) {
- exceptionState.throwDOMException(ReadOnlyError, ExceptionMessages::failedToExecute("delete", "IDBCursor", "The record may not be deleted inside a read-only transaction."));
+ exceptionState.throwDOMException(ReadOnlyError, "The record may not be deleted inside a read-only transaction.");
return 0;
}
if (!m_gotValue) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("delete", "IDBCursor", IDBDatabase::noValueErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
return 0;
}
if (isKeyCursor()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("delete", "IDBCursor", IDBDatabase::isKeyCursorErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::isKeyCursorErrorMessage);
return 0;
}
if (isDeleted()) {
- exceptionState.throwDOMException(InvalidStateError, ExceptionMessages::failedToExecute("delete", "IDBCursor", IDBDatabase::sourceDeletedErrorMessage));
+ exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
return 0;
}
« no previous file with comments | « Source/modules/imagebitmap/ImageBitmapFactories.cpp ('k') | Source/modules/indexeddb/IDBFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698