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

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

Issue 1158973007: IndexedDB: Rely on bindings for enum validation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 7 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/IDBTransaction.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBTransaction.cpp
diff --git a/Source/modules/indexeddb/IDBTransaction.cpp b/Source/modules/indexeddb/IDBTransaction.cpp
index c8df341edde5e533a73441f2d66bda96b70bf3de..305cf03bb2a421849c026fb616293406d9616221 100644
--- a/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/Source/modules/indexeddb/IDBTransaction.cpp
@@ -299,14 +299,15 @@ bool IDBTransaction::hasPendingActivity() const
return m_hasPendingActivity && !m_contextStopped;
}
-WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeString, ExceptionState& exceptionState)
+WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeString)
{
if (modeString == IndexedDBNames::readonly)
return WebIDBTransactionModeReadOnly;
if (modeString == IndexedDBNames::readwrite)
return WebIDBTransactionModeReadWrite;
-
- exceptionState.throwTypeError("The mode provided ('" + modeString + "') is not one of 'readonly' or 'readwrite'.");
+ if (modeString == IndexedDBNames::versionchange)
+ return WebIDBTransactionModeVersionChange;
+ ASSERT_NOT_REACHED();
return WebIDBTransactionModeReadOnly;
}
« no previous file with comments | « Source/modules/indexeddb/IDBTransaction.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698