Bug 115493

Summary: Implement LocalStorageDatabase::importItems
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch kling: review+

Anders Carlsson
Reported 2013-05-01 16:00:40 PDT
Implement LocalStorageDatabase::importItems
Attachments
Patch (5.43 KB, patch)
2013-05-01 16:01 PDT, Anders Carlsson
kling: review+
Anders Carlsson
Comment 1 2013-05-01 16:01:41 PDT
Andreas Kling
Comment 2 2013-05-01 16:11:04 PDT
Comment on attachment 200249 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=200249&action=review > Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp:139 > +void LocalStorageDatabase::importItems(StorageMap& storageMap) Why doesn't this method return something to indicate success/failure? > Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp:158 > + items.set(query.getColumnText(0), query.getColumnBlobAsString(1)); You're not gonna sanity-check the column types?
Anders Carlsson
Comment 3 2013-05-01 16:12:58 PDT
(In reply to comment #2) > (From update of attachment 200249 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=200249&action=review > > > Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp:139 > > +void LocalStorageDatabase::importItems(StorageMap& storageMap) > > Why doesn't this method return something to indicate success/failure? It indicates success by adding the items to the map. > > > Source/WebKit2/UIProcess/Storage/LocalStorageDatabase.cpp:158 > > + items.set(query.getColumnText(0), query.getColumnBlobAsString(1)); > > You're not gonna sanity-check the column types? We already know that column 1 is a blob (taken care of by migrateItemTableIfNeeded()), and column 0 will always be coerced to a string.
Andreas Kling
Comment 4 2013-05-01 16:13:45 PDT
Comment on attachment 200249 [details] Patch Okay, r=me.
Anders Carlsson
Comment 5 2013-05-01 16:16:32 PDT
Note You need to log in before you can comment on or make changes to this bug.