IndexedDB: Integer version lost after first open/close/open cycle
Created attachment 162274 [details] Repro layout test
Comment on attachment 162274 [details] Repro layout test As shown in the above test, the database's integer version is lost after an open/close/open cycle. The close is required to let the backing store be released from memory. The test must NOT be preceded by a delete, as that would create the on-disk backing store and bias the test result. Note that http://webkit.org/b/92166 will also bias this test if the test is run in a batch.
Created attachment 162276 [details] Patch
dgrogan@ - please take a look
Comment on attachment 162276 [details] Patch LGTM
Comment on attachment 162276 [details] Patch another one: tony@ - r? cq?
Comment on attachment 162276 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162276&action=review > Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:141 > + const int64_t latestSchemaVersion = 1; We only need this value here? How will you remember to update this in the future?
Comment on attachment 162276 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162276&action=review >> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:141 >> + const int64_t latestSchemaVersion = 1; > > We only need this value here? How will you remember to update this in the future? It's only needed/used in this method. The method is responsible to doing the migration from all previous versions to the latest version. It currently handles only the 0 -> 1 case, but if we rev the schema again (i.e. to 2) we'll need to handle the 0 -> 2 and 1 -> 2 cases.
Comment on attachment 162276 [details] Patch Clearing flags on attachment: 162276 Committed r127669: <http://trac.webkit.org/changeset/127669>
All reviewed patches have been landed. Closing bug.