Chromium Code Reviews| Index: Source/modules/indexeddb/IDBObjectStore.cpp |
| diff --git a/Source/modules/indexeddb/IDBObjectStore.cpp b/Source/modules/indexeddb/IDBObjectStore.cpp |
| index b7d42bc8fdbb895a5f0707ba61cafec9845dbe7e..be0ee795cbbcfd6ece60ac3d89d358f4d06b4412 100644 |
| --- a/Source/modules/indexeddb/IDBObjectStore.cpp |
| +++ b/Source/modules/indexeddb/IDBObjectStore.cpp |
| @@ -126,10 +126,9 @@ IDBRequest* IDBObjectStore::getAll(ScriptState* scriptState, const ScriptValue& |
| IDBRequest* IDBObjectStore::getAll(ScriptState* scriptState, const ScriptValue& keyRange, unsigned long maxCount, ExceptionState& exceptionState) |
| { |
| IDB_TRACE("IDBObjectStore::getAll"); |
| - if (!maxCount) { |
| - exceptionState.throwTypeError(IDBDatabase::notValidMaxCountErrorMessage); |
|
cmumford
2015/08/21 17:32:40
Since you're deleting all references to notValidMa
jsbell
2015/08/21 17:48:32
Done.
|
| - return nullptr; |
| - } |
| + if (!maxCount) |
| + maxCount = std::numeric_limits<uint32_t>::max(); |
| + |
| if (isDeleted()) { |
| exceptionState.throwDOMException(InvalidStateError, IDBDatabase::objectStoreDeletedErrorMessage); |
| return nullptr; |
| @@ -163,10 +162,9 @@ IDBRequest* IDBObjectStore::getAllKeys(ScriptState* scriptState, const ScriptVal |
| IDBRequest* IDBObjectStore::getAllKeys(ScriptState* scriptState, const ScriptValue& keyRange, unsigned long maxCount, ExceptionState& exceptionState) |
| { |
| IDB_TRACE("IDBObjectStore::getAll"); |
| - if (!maxCount) { |
| - exceptionState.throwTypeError(IDBDatabase::notValidMaxCountErrorMessage); |
| - return 0; |
| - } |
| + if (!maxCount) |
| + maxCount = std::numeric_limits<uint32_t>::max(); |
| + |
| if (isDeleted()) { |
| exceptionState.throwDOMException(InvalidStateError, IDBDatabase::objectStoreDeletedErrorMessage); |
| return 0; |