Bug 152600

Summary: Modern IDB: storage/indexeddb/database-deletepending-flag.html fails
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, alecflett, commit-queue, jsbell
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 152593    
Bug Blocks: 149117, 150882    
Attachments:
Description Flags
Patch v1
none
Patch v1
none
Patch v2 none

Description Brady Eidson 2015-12-30 14:24:36 PST
Modern IDB: storage/indexeddb/database-deletepending-flag.html fails

We didn't *actually* delete the backing store when handling a delete operation in the server.

Therefore a new fresh backing store was never created, which this test expects.
Comment 1 Brady Eidson 2015-12-30 14:46:33 PST
Created attachment 268012 [details]
Patch v1
Comment 2 Brady Eidson 2015-12-30 14:48:50 PST
Doesn't apply to trunk because it builds off of the patch in 152593  =/
Comment 3 Andy Estes 2015-12-30 15:31:20 PST
I just reviewed 152593, if you want to land that and resubmit this for EWS analysis.
Comment 4 Alex Christensen 2015-12-30 20:48:21 PST
Comment on attachment 268012 [details]
Patch v1

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

> Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:187
> +    BackingStoreDeleteMode deleteMode = m_pendingOpenDBRequests.isEmpty() ? BackingStoreDeleteMode::DeleteOnly : BackingStoreDeleteMode::DeleteThenReopen;

Is it possible to make an open db request between starting and finishing deleting a backing store?
Comment 5 Brady Eidson 2015-12-30 21:45:41 PST
Created attachment 268026 [details]
Patch v1
Comment 6 Brady Eidson 2015-12-30 22:29:10 PST
(In reply to comment #4)
> Comment on attachment 268012 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=268012&action=review
> 
> > Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:187
> > +    BackingStoreDeleteMode deleteMode = m_pendingOpenDBRequests.isEmpty() ? BackingStoreDeleteMode::DeleteOnly : BackingStoreDeleteMode::DeleteThenReopen;
> 
> Is it possible to make an open db request between starting and finishing
> deleting a backing store?

Great question - Yes.

I'll rethink the async call. Won't be too hard to fix that issue...  but it will be nigh impossible to test.  =/
Comment 7 Brady Eidson 2015-12-31 22:53:50 PST
Created attachment 268070 [details]
Patch v2

Without the bug Alex spotted, and much simpler anyways.
Comment 8 WebKit Commit Bot 2016-01-01 21:49:18 PST
Comment on attachment 268070 [details]
Patch v2

Clearing flags on attachment: 268070

Committed r194488: <http://trac.webkit.org/changeset/194488>
Comment 9 WebKit Commit Bot 2016-01-01 21:49:22 PST
All reviewed patches have been landed.  Closing bug.