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

Side by Side Diff: content/browser/indexed_db/indexed_db_database.cc

Issue 1138643007: IndexedDB: Zero no longer a valid value for maxCount in getAll(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_database.h" 5 #include "content/browser/indexed_db/indexed_db_database.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 10
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 739
740 void IndexedDBDatabase::GetAllOperation( 740 void IndexedDBDatabase::GetAllOperation(
741 int64 object_store_id, 741 int64 object_store_id,
742 scoped_ptr<IndexedDBKeyRange> key_range, 742 scoped_ptr<IndexedDBKeyRange> key_range,
743 int64 max_count, 743 int64 max_count,
744 scoped_refptr<IndexedDBCallbacks> callbacks, 744 scoped_refptr<IndexedDBCallbacks> callbacks,
745 IndexedDBTransaction* transaction) { 745 IndexedDBTransaction* transaction) {
746 IDB_TRACE1("IndexedDBDatabase::GetAllOperation", "txn.id", transaction->id()); 746 IDB_TRACE1("IndexedDBDatabase::GetAllOperation", "txn.id", transaction->id());
747 747
748 DCHECK_GE(max_count, 0); 748 DCHECK_GT(max_count, 0);
749 if (!max_count)
750 max_count = std::numeric_limits<decltype(max_count)>::max();
751 749
752 DCHECK(metadata_.object_stores.find(object_store_id) != 750 DCHECK(metadata_.object_stores.find(object_store_id) !=
753 metadata_.object_stores.end()); 751 metadata_.object_stores.end());
754 const IndexedDBObjectStoreMetadata& object_store_metadata = 752 const IndexedDBObjectStoreMetadata& object_store_metadata =
755 metadata_.object_stores[object_store_id]; 753 metadata_.object_stores[object_store_id];
756 754
757 leveldb::Status s; 755 leveldb::Status s;
758 756
759 scoped_ptr<IndexedDBBackingStore::Cursor> cursor = 757 scoped_ptr<IndexedDBBackingStore::Cursor> cursor =
760 backing_store_->OpenObjectStoreCursor( 758 backing_store_->OpenObjectStoreCursor(
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 IndexedDBTransaction* transaction) { 1923 IndexedDBTransaction* transaction) {
1926 DCHECK(!transaction); 1924 DCHECK(!transaction);
1927 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation", 1925 IDB_TRACE1("IndexedDBDatabase::VersionChangeAbortOperation",
1928 "txn.id", 1926 "txn.id",
1929 transaction->id()); 1927 transaction->id());
1930 metadata_.version = previous_version; 1928 metadata_.version = previous_version;
1931 metadata_.int_version = previous_int_version; 1929 metadata_.int_version = previous_int_version;
1932 } 1930 }
1933 1931
1934 } // namespace content 1932 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698