Closed Bug 1329689 Opened 7 years ago Closed 7 years ago

QuotaManager: Upgrade loop should also cover "from 0_0 to 1_0" case

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: janv, Assigned: janv)

Details

Attachments

(1 file)

We're adding new upgrade methods in other bugs, but I found out that our upgrade loop is buggy. It works fine right now because there are no real upgrade methods in the loop.
The problem is that if storage.sqlite doesn't exist (|if (newDatabase)| branch), we execute all the legacy stuff like upgrading indexedDB/ to storage/, but we don't execute the upgrade loop at all. It means that if we add a new upgrade method to the loop and then someone with an old profile (no storage.sqlite) jumps directly to current Nightly, the new upgrade method won't be executed at all.

I refactored stuff a bit to fix this issue and I also added a small optimization for the case when we have a new profile, in which case we don't have to execute the upgrade loop.
Attached patch patchSplinter Review
Assignee: nobody → jvarga
Status: NEW → ASSIGNED
Attachment #8825093 - Flags: review?(bugmail)
Comment on attachment 8825093 [details] [diff] [review]
patch

Review of attachment 8825093 [details] [diff] [review]:
-----------------------------------------------------------------

Nice fresh profile optimization!
Attachment #8825093 - Flags: review?(bugmail) → review+
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b93a1c921f66
QuotaManager: Upgrade loop should also cover "from 0_0 to 1_0" case; r=asuth
https://hg.mozilla.org/mozilla-central/rev/b93a1c921f66
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: