Bug 154187

Summary: Modern IDB: Simplify the relationship between IDBObjectStore and IDBIndex
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, commit-queue, darin, ggaren, jsbell
Priority: P2    
Version: Safari 9   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149117, 154015    
Attachments:
Description Flags
Patch v1 none

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.