Bug 91127 - IndexedDB: add non-modifying methods to check index existance
Summary: IndexedDB: add non-modifying methods to check index existance
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alec Flett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-12 11:33 PDT by Alec Flett
Modified: 2013-04-08 11:03 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Flett 2012-07-12 11:33:25 PDT
The current findKeyInIndex (in IDBLevelDBBackingStore.cpp) sometimes modifies the database to remove stale index entries. Sometimes this is fine, but sometimes when you're looking up a index key multiple times (like once to check if it's there, and a second time to find which record to overwrite) you want to have a little more control over when we're actually modifying the database. More concretely, this means that IDBBackingStore::keyExistsInIndex() and IDBBackingStore::getPrimaryKeyViaIndex cannot be const, which is going to possibly complicate caching down the road in IDB.Next.

So what we need is two version of findKeyInIndex, and figure out when is a good time to call the const vs the non-const one.