DescriptionIndexedDB: Prevent store/index deletion from racing ahead of use
In the Indexed DB spec, schema updates occur synchronously from the
perspective of script, e.g. you can create a store then use it
immediately without waiting for a request to complete. That model was
carried through to the back end, but with a subtle issue that the
deletion of a store or index could "race ahead" of a previously
requested use of it.
Change store/index deletion to take place in order with other
requests, so do all the work (in-memory and backing store) during the
scheduled operation, rather than on IPC receipt. Also change
store/index creation to do all the work (in-memory and backing store)
synchronously, since index population is already preemptively done.
And since this requires shuffling when the "abort" operations should
be queued, rework the API there slightly.
BUG=370056, 368271, 362723
R=cmumford@chromium.org,ericu@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272282
Patch Set 1 #Patch Set 2 : Rework AbortTask test #Patch Set 3 : Added tests #
Total comments: 14
Patch Set 4 : Address race; add unit test #Patch Set 5 : base::Closure copies const-refs, so this is better #
Total comments: 6
Messages
Total messages: 21 (0 generated)
|