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

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

Issue 1303983002: IndexedDB: Treat count of 0 as unbounded for getAll() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 5 years, 4 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/IDBIndex.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
- 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;
« no previous file with comments | « Source/modules/indexeddb/IDBIndex.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698