Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
IndexedDB: Decode correct int type for database name->id map
Browse files Browse the repository at this point in the history
Database enumeration was decoding id as VarInt, but it's a plain Int.

R=cmumford@chromium.org
BUG=407015

Review URL: https://codereview.chromium.org/503913002

Cr-Commit-Position: refs/heads/master@{#291792}
  • Loading branch information
inexorabletash authored and Commit bot committed Aug 25, 2014
1 parent 7ebc2c4 commit 3f53c98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/browser/indexed_db/indexed_db_backing_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ std::vector<base::string16> IndexedDBBackingStore::GetDatabaseNames(
// Decode database id (in iterator value).
int64 database_id = 0;
StringPiece valueSlice(it->Value());
if (!DecodeVarInt(&valueSlice, &database_id) || !valueSlice.empty()) {
if (!DecodeInt(&valueSlice, &database_id) || !valueSlice.empty()) {
INTERNAL_CONSISTENCY_ERROR_UNTESTED(GET_DATABASE_NAMES);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion content/browser/indexed_db/indexed_db_leveldb_coding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// <0, 0, 0, 100, database id>
// => Existence implies the database id is in the free list
// [DatabaseFreeListKey]
// <0, 0, 0, 201, origin, database name> => Database id [DatabaseNameKey]
// <0, 0, 0, 201, origin, database name> => Database id (int) [DatabaseNameKey]
//
//
// Database metadata: [DatabaseMetaDataKey]
Expand Down

0 comments on commit 3f53c98

Please sign in to comment.