Summary: | Modern IDB: "prevunique" cursors should point at the lowest primary key that matches, not the highest | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||
Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | achristensen, aestes, alecflett, commit-queue, jsbell | ||||||
Priority: | P2 | ||||||||
Version: | Safari 9 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 149117, 150882, 151684 | ||||||||
Attachments: |
|
Description
Brady Eidson
2015-11-30 14:30:16 PST
Created attachment 266291 [details]
Patch v1
Comment on attachment 266291 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=266291&action=review > Source/WebCore/Modules/indexeddb/server/IndexValueEntry.cpp:222 > - auto iterator = std::set<IDBKeyData>::reverse_iterator(m_orderedKeys->upper_bound(key)); > + > + std::set<IDBKeyData>::reverse_iterator iterator = std::set<IDBKeyData>::reverse_iterator(m_orderedKeys->upper_bound(key)); Why the change here? Is it useful to repeat std::set<IDBKeyData>::reverse_iterator twice? > Source/WebCore/Modules/indexeddb/server/IndexValueEntry.h:38 > +enum class CursorDuplicity; Is this kind of forward declaration of an enum class sufficient? If so, that’s great and I was not aware until now. (In reply to comment #2) > Comment on attachment 266291 [details] > Patch v1 > > View in context: > https://bugs.webkit.org/attachment.cgi?id=266291&action=review > > > Source/WebCore/Modules/indexeddb/server/IndexValueEntry.cpp:222 > > - auto iterator = std::set<IDBKeyData>::reverse_iterator(m_orderedKeys->upper_bound(key)); > > + > > + std::set<IDBKeyData>::reverse_iterator iterator = std::set<IDBKeyData>::reverse_iterator(m_orderedKeys->upper_bound(key)); > > Why the change here? Is it useful to repeat > std::set<IDBKeyData>::reverse_iterator twice? The patch was more complicated originally and required a fully-typed local variable to play with. Then it got easier again and I forgot to make it auto. Will-do! > > > Source/WebCore/Modules/indexeddb/server/IndexValueEntry.h:38 > > +enum class CursorDuplicity; > > Is this kind of forward declaration of an enum class sufficient? If so, > that’s great and I was not aware until now. Yes, it is! It's one of the understated great things about enum class! Created attachment 266300 [details]
Patch for landing
Comment on attachment 266300 [details] Patch for landing Clearing flags on attachment: 266300 Committed r192847: <http://trac.webkit.org/changeset/192847> |