Bug 91127
| Summary: | IndexedDB: add non-modifying methods to check index existance | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alec Flett <alecflett> |
| Component: | WebCore Misc. | Assignee: | Alec Flett <alecflett> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alec Flett
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |