Summary: | Add a cross-platform IDBRecordIdentifier | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||||
Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | alecflett, andersca, ap, charles.wei, commit-queue, jsbell, thorton | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 123027 | ||||||||
Attachments: |
|
Description
Brady Eidson
2013-10-21 23:06:44 PDT
Created attachment 214820 [details]
Patch v1
Comment on attachment 214820 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=214820&action=review > Source/WebCore/Modules/indexeddb/IDBBackingStoreInterface.h:71 > + virtual const IDBRecordIdentifier* recordIdentifier() const = 0; Why is this a pointer instead now? Will it ever be null? > Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:947 > + ASSERT(recordIdentifier); It would be nicer to pass the IDBRecordIdentifier here by reference. Then you wouldn't need this ugly assertion.. > Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:1195 > + ASSERT(recordIdentifier); It would be nicer to pass the IDBRecordIdentifier here by reference. Then you wouldn't need this ugly assertion.. > Source/WebCore/Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:66 > + ASSERT(recordIdentifier); It would be nicer to pass the IDBRecordIdentifier here by reference. Then you wouldn't need this ugly assertion.. (In reply to comment #2) > (From update of attachment 214820 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=214820&action=review > > > Source/WebCore/Modules/indexeddb/IDBBackingStoreInterface.h:71 > > + virtual const IDBRecordIdentifier* recordIdentifier() const = 0; > > Why is this a pointer instead now? Will it ever be null? I forgot ptr->reference is your thing. It might be null, in that previously it might have been a default constructed object representing nothing. I'll see if I can make it back to a reference... Created attachment 214866 [details]
Patch v2
Comment on attachment 214866 [details] Patch v2 View in context: https://bugs.webkit.org/attachment.cgi?id=214866&action=review Okay. r=me Looking forward to your "fix all of this terrible code" refactor :) > Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:1643 > + virtual const IDBRecordIdentifier& recordIdentifier() const OVERRIDE { ASSERT_NOT_REACHED(); return *(m_recordIdentifier.get()); } return *m_recordIdentifier; > Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:1734 > + virtual const IDBRecordIdentifier& recordIdentifier() const OVERRIDE { ASSERT_NOT_REACHED(); return *(m_recordIdentifier.get()); } return *m_recordIdentifier; > Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:117 > + virtual const IDBRecordIdentifier& recordIdentifier() const OVERRIDE { return *(m_recordIdentifier.get()); } return *m_recordIdentifier; (In reply to comment #5) > (From update of attachment 214866 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=214866&action=review > > Okay. r=me > > Looking forward to your "fix all of this terrible code" refactor :) Me too, brother, me too. |