Implement LocalStorageDatabase::importItems
Created attachment 200249 [details] Patch
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?
(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.
Comment on attachment 200249 [details] Patch Okay, r=me.
Committed r149460: <http://trac.webkit.org/changeset/149460>