Bug 150911

Summary: Modern IDB: IDBObjectStore.deleteIndex() support
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, alecflett, commit-queue, jsbell
Priority: P2    
Version: Safari 9   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 149117    
Attachments:
Description Flags
Patch v1
none
Patch v2
none
Patch v3 achristensen: review+, achristensen: commit-queue-

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