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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp

Issue 2349413002: Minor IndexedDB refactorings. (Closed)
Patch Set: Created 4 years, 3 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
Index: third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
index be3602a4c2e2a679cb55389f02c6b2bca0e8c3b5..27c46f2fea698dd7ff468205ce70d7dcb4f4b1c6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
@@ -336,12 +336,11 @@ ScriptValue IDBCursor::value(ScriptState* scriptState)
ASSERT(isCursorWithValue());
IDBObjectStore* objectStore = effectiveObjectStore();
- const IDBObjectStoreMetadata& metadata = objectStore->metadata();
IDBAny* value;
if (!m_value) {
value = IDBAny::createUndefined();
- } else if (metadata.autoIncrement && !metadata.keyPath.isNull()) {
- RefPtr<IDBValue> idbValue = IDBValue::create(m_value.get(), m_primaryKey, metadata.keyPath);
+ } else if (objectStore->autoIncrement() && !objectStore->idbKeyPath().isNull()) {
+ RefPtr<IDBValue> idbValue = IDBValue::create(m_value.get(), m_primaryKey, objectStore->idbKeyPath());
#if ENABLE(ASSERT)
assertPrimaryKeyValidOrInjectable(scriptState, idbValue.get());
#endif

Powered by Google App Engine
This is Rietveld 408576698