Chromium Code Reviews| Index: Source/modules/indexeddb/IDBDatabase.cpp |
| diff --git a/Source/modules/indexeddb/IDBDatabase.cpp b/Source/modules/indexeddb/IDBDatabase.cpp |
| index 33270b39a61ae2b6637264dcb07b59fb25a580e1..d365d959afae1069d25fc9ad5a2c98841e6b0420 100644 |
| --- a/Source/modules/indexeddb/IDBDatabase.cpp |
| +++ b/Source/modules/indexeddb/IDBDatabase.cpp |
| @@ -289,7 +289,12 @@ IDBTransaction* IDBDatabase::transaction(ScriptState* scriptState, const StringO |
| return nullptr; |
| } |
| - WebIDBTransactionMode mode = IDBTransaction::stringToMode(modeString, exceptionState); |
| + WebIDBTransactionMode mode = IDBTransaction::stringToMode(modeString); |
| + if (mode != WebIDBTransactionModeReadOnly && mode != WebIDBTransactionModeReadWrite) { |
|
jsbell
2015/06/02 19:01:07
Written this way instead of (mode == WebIDBTransac
|
| + exceptionState.throwTypeError("The mode provided ('" + modeString + "') is not one of 'readonly' or 'readwrite'."); |
|
jsbell
2015/06/02 19:01:07
And similarly, this could be changed to e.g. "You
|
| + return nullptr; |
| + } |
| + |
| if (exceptionState.hadException()) |
| return nullptr; |