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..8dcea537cb067ad66a50ba5d564e107d14bf8e9f 100644 |
--- a/content/browser/indexed_db/indexed_db_database.cc |
+++ b/content/browser/indexed_db/indexed_db_database.cc |
@@ -883,15 +883,16 @@ 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 +956,11 @@ void IndexedDBDatabase::GetOperation( |
return; |
} |
+ if (cursor_type == indexed_db::CURSOR_KEY_ONLY) { |
+ callbacks->OnSuccess(*key); |
+ return; |
+ } |
+ |
if (object_store_metadata.auto_increment && |
!object_store_metadata.key_path.IsNull()) { |
value.primary_key = *key; |