What's getting corrupted is Firefox's own SQLite DB.
The question is how it is getting corrupted. Is it that SQLite has a bug? Or the copy of SQLite in Firefox is getting corrupted first?
Given the complexity and relative levels of testing of those two products, my bet is that the problem is Firefox.