Bug 150911 - Modern IDB: IDBObjectStore.deleteIndex() support
Summary: Modern IDB: IDBObjectStore.deleteIndex() support
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
  Show dependency treegraph
 
Reported: 2015-11-04 16:51 PST by Brady Eidson
Modified: 2015-11-19 11:57 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (61.26 KB, patch)
2015-11-19 10:28 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch v2 (61.25 KB, patch)
2015-11-19 10:29 PST, Brady Eidson
no flags Details | Formatted Diff | Diff
Patch v3 (61.24 KB, patch)
2015-11-19 10:30 PST, Brady Eidson
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2015-11-04 16:51:08 PST
Modern IDB: IDBObjectStore.deleteIndex() support
Comment 1 Brady Eidson 2015-11-19 10:28:05 PST
Created attachment 265871 [details]
Patch v1
Comment 2 Brady Eidson 2015-11-19 10:29:49 PST
Created attachment 265873 [details]
Patch v2
Comment 3 Brady Eidson 2015-11-19 10:30:54 PST
Created attachment 265874 [details]
Patch v3
Comment 4 Alex Christensen 2015-11-19 11:01:43 PST
Comment on attachment 265874 [details]
Patch v3

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

> Source/WebCore/Modules/indexeddb/client/IDBIndexImpl.cpp:332
> +    m_deleted = true;

Add tests for this.  Probably to existing tests.

> Source/WebCore/Modules/indexeddb/client/TransactionOperation.h:149
> +    auto operation = new TransactionOperationImpl<MP1, MP2>(transaction, complete, perform, parameter1, parameter2);

auto*

> Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:211
> +    if (!transaction)

There are no tests that delete a non-existent index.

> Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp:109
> +    if (m_info.hasIndex(index->info().name()))

ASSERT(index); or early return.
Comment 5 Brady Eidson 2015-11-19 11:54:26 PST
(In reply to comment #4)

> > Source/WebCore/Modules/indexeddb/client/TransactionOperation.h:149
> > +    auto operation = new TransactionOperationImpl<MP1, MP2>(transaction, complete, perform, parameter1, parameter2);
> 
> auto*

None of the other impls in this file do that, and it's not necessary to resolve an ambiguity, so I'll be skipping it in this patch.
Comment 6 Brady Eidson 2015-11-19 11:57:39 PST
https://trac.webkit.org/changeset/192645