Add a cross-platform IDBRecordIdentifier Turns out it's already a cross platform concept. Just need the right header and other code changes to adapt. More work towards https://bugs.webkit.org/show_bug.cgi?id=123027
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;
http://trac.webkit.org/changeset/157798
(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.