Bug 127880 - IDB: Implement IDBObjectStore.delete()
Summary: IDB: Implement IDBObjectStore.delete()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks: 124521
  Show dependency treegraph
 
Reported: 2014-01-29 17:54 PST by Jon Lee
Modified: 2014-02-01 12:56 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (18.63 KB, patch)
2014-02-01 12:36 PST, Brady Eidson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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