Bug 154187 - Modern IDB: Simplify the relationship between IDBObjectStore and IDBIndex
Summary: Modern IDB: Simplify the relationship between IDBObjectStore and IDBIndex
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117 154015
  Show dependency treegraph
 
Reported: 2016-02-12 12:55 PST by Brady Eidson
Modified: 2016-02-12 15:01 PST (History)
6 users (show)

See Also:


Attachments
Patch v1 (12.41 KB, patch)
2016-02-12 13:44 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-02-12 12:55:47 PST
Modern IDB: Simplify the relationship between IDBObjectStore and IDBIndex

The patch that landed to resolve https://bugs.webkit.org/show_bug.cgi?id=154110 was... weird. And an email thread has somewhat agreed we should simplify it by letting object stores build up a list of deleted indexes, instead of trying to let them die naturally, as creating/deleteing indexes are rare operations, and optimizing is not worth the... weirdness.
Comment 1 Brady Eidson 2016-02-12 13:44:02 PST
Created attachment 271214 [details]
Patch v1
Comment 2 Alex Christensen 2016-02-12 14:09:28 PST
Comment on attachment 271214 [details]
Patch v1

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

This makes ownership a lot easer to follow.

> Source/WebCore/Modules/indexeddb/client/IDBObjectStoreImpl.cpp:572
> +            m_deletedIndexes.add(WTFMove(index));

So this hangs onto the deleted indexes for as long as the object store exists.  If someone creates and deletes a lot of indexes, it would increase the memory, but I guess that's a rare thing to do.
Comment 3 WebKit Commit Bot 2016-02-12 15:01:21 PST
Comment on attachment 271214 [details]
Patch v1

Clearing flags on attachment: 271214

Committed r196518: <http://trac.webkit.org/changeset/196518>
Comment 4 WebKit Commit Bot 2016-02-12 15:01:24 PST
All reviewed patches have been landed.  Closing bug.