Bug 123138

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 Flags
Patch v1
none
Patch v2 kling: review+

Brady Eidson
Reported 2013-10-21 23:06:44 PDT
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
Attachments
Patch v1 (36.25 KB, patch)
2013-10-21 23:13 PDT, Brady Eidson
no flags
Patch v2 (37.69 KB, patch)
2013-10-22 09:49 PDT, Brady Eidson
kling: review+
Brady Eidson
Comment 1 2013-10-21 23:13:01 PDT
Created attachment 214820 [details] Patch v1
Andreas Kling
Comment 2 2013-10-22 09:14:18 PDT
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..
Brady Eidson
Comment 3 2013-10-22 09:24:06 PDT
(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...
Brady Eidson
Comment 4 2013-10-22 09:49:31 PDT
Created attachment 214866 [details] Patch v2
Andreas Kling
Comment 5 2013-10-22 09:57:08 PDT
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;
Brady Eidson
Comment 6 2013-10-22 10:07:07 PDT
Brady Eidson
Comment 7 2013-10-22 10:07:39 PDT
(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.
Note You need to log in before you can comment on or make changes to this bug.