Bug 127880

Summary: IDB: Implement IDBObjectStore.delete()
Product: WebKit Reporter: Jon Lee <jonlee>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, commit-queue, jsbell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 124521    
Attachments:
Description Flags
Patch v1 sam: review+

Description Jon Lee 2014-01-29 17:54:31 PST
IDB: Implement IDBObjectStore.delete()
Comment 1 Radar WebKit Bug Importer 2014-01-29 17:55:15 PST
<rdar://problem/15942888>
Comment 2 Brady Eidson 2014-02-01 12:36:39 PST
Created attachment 222888 [details]
Patch v1
Comment 3 Sam Weinig 2014-02-01 12:42:06 PST
Comment on attachment 222888 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=222888&action=review

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:880
> +    keys.append(cursor->currentKey());
> +    while (cursor->advance(1))
> +        keys.append(cursor->currentKey());

This could probably be a do { } while() loop.

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:892
> +    for (auto key : keys) {

This will probably copy each key, which is not what you want.  Instead use, for (auto& key : keys)
Comment 4 Brady Eidson 2014-02-01 12:56:16 PST
http://trac.webkit.org/changeset/163249