Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_database.cc |
| diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc |
| index 032d01d211d929294ba4454a006faa4616b62caa..e466e7ee86b9b0a5d7a8a3973ada7edb62f1afa0 100644 |
| --- a/content/browser/indexed_db/indexed_db_database.cc |
| +++ b/content/browser/indexed_db/indexed_db_database.cc |
| @@ -883,15 +883,24 @@ void IndexedDBDatabase::GetOperation( |
| key = &key_range->lower(); |
| } else { |
| if (index_id == IndexedDBIndexMetadata::kInvalidId) { |
| - DCHECK_NE(cursor_type, indexed_db::CURSOR_KEY_ONLY); |
| // ObjectStore Retrieval Operation |
| - backing_store_cursor = backing_store_->OpenObjectStoreCursor( |
| - transaction->BackingStoreTransaction(), |
| - id(), |
| - object_store_id, |
| - *key_range, |
| - blink::WebIDBCursorDirectionNext, |
| - &s); |
| + if (cursor_type == indexed_db::CURSOR_KEY_ONLY) { |
| + backing_store_cursor = backing_store_->OpenObjectStoreKeyCursor( |
| + transaction->BackingStoreTransaction(), |
| + id(), |
| + object_store_id, |
| + *key_range, |
| + blink::WebIDBCursorDirectionNext, |
| + &s); |
| + } else { |
| + backing_store_cursor = backing_store_->OpenObjectStoreCursor( |
| + transaction->BackingStoreTransaction(), |
| + id(), |
| + object_store_id, |
| + *key_range, |
| + blink::WebIDBCursorDirectionNext, |
| + &s); |
| + } |
| } else if (cursor_type == indexed_db::CURSOR_KEY_ONLY) { |
| // Index Value Retrieval Operation |
| backing_store_cursor = backing_store_->OpenIndexKeyCursor( |
| @@ -955,6 +964,11 @@ void IndexedDBDatabase::GetOperation( |
| return; |
| } |
| + if (cursor_type == indexed_db::CURSOR_KEY_ONLY) { |
| + callbacks->OnSuccess(*key); |
|
cmumford
2016/08/29 19:03:22
Indenting is wrong.
|
| + return; |
| + } |
| + |
| if (object_store_metadata.auto_increment && |
| !object_store_metadata.key_path.IsNull()) { |
| value.primary_key = *key; |