Closed Bug 416173 Opened 14 years ago Closed 14 years ago
DB is completely useless
BackupDB is completely useless since you'd want to use it when you cannot open a connection, but we don't return a connection when you cannot open this. Requesting blocking since this blocks a firefox3 blocker (bug 386768)
Consumers of this API will need to be updated.
So this changes our behavior a little bit. We've always had the connectionReady attribute, but never really advocated it's use. Now we'll depend on it, so consumers should check if the connection is ready before using it. If it isn't ready, they should assume the database is corrupted, back it up (if they want to), and start over. This is a late api change, but I think we need it for a method like backupDB to work effectively.
Attachment #301964 - Flags: review?(vladimir)
Comment on attachment 301964 [details] [diff] [review] v1.0 Looks fine, but can you add some more documentation suggesting a backup if the database connection failed? Just so that people have an idea of what they could do if the database open fails.
Attachment #301964 - Flags: review?(vladimir) → review+
Addresses review comments.
Whiteboard: [has patch][needs review vlad] → [has patch][has review][needs approval]
Comment on attachment 301978 [details] [diff] [review] v1.1 a1.9+=damons
Attachment #301978 - Flags: approval1.9? → approval1.9+
Whiteboard: [has patch][has review][needs approval] → [has patch][has review][has approval][can land]
Flags: blocking1.9? → blocking1.9+
Checking in storage/public/mozIStorageConnection.idl; new revision: 1.15; previous revision: 1.14 Checking in storage/public/mozIStorageService.idl; new revision: 1.8; previous revision: 1.7 Checking in storage/src/mozStorageService.cpp; new revision: 1.15; previous revision: 1.14 Checking in storage/test/unit/head_storage.js; new revision: 1.7; previous revision: 1.6 Checking in storage/test/unit/test_bug-416173.js; initial revision: 1.1 Checking in storage/test/unit/corruptDB.sqlite; initial revision: 1.1
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][has approval][can land]
You need to log in before you can comment on or make changes to this bug.