Closed Bug 488811 Opened 15 years ago Closed 15 years ago

nsIPermissionManager.removeAll() should delete DB and re-init rather than just bailing.

Categories

(Core :: Graphics: Image Blocking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: mconnor, Assigned: ehsan.akhgari)

Details

(Keywords: fixed1.9.1, privacy)

Attachments

(1 file)

see bug 488801

If this fails for any reason we should just nuke the file and re-init the DB.
Flags: wanted1.9.1+
Version: unspecified → Trunk
Attached patch Patch (v1)Splinter Review
Delete the corrupted DB and reinit it instead of just failing.

I also added a unit test which deliberately corrupts permissions.sqlite and tries to make sure that nsIPermissionManager::RemoveAll does not fail.
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Attachment #373280 - Flags: superreview?(bzbarsky)
Attachment #373280 - Flags: review?(dwitte)
Comment on attachment 373280 [details] [diff] [review]
Patch (v1)

r=me, thanks!
Attachment #373280 - Flags: review?(dwitte) → review+
Comment on attachment 373280 [details] [diff] [review]
Patch (v1)

Unless there are a lot of existing callers, please don't use an optional arg here.  Just change the callers as needed.

With that, sr=me.
Attachment #373280 - Flags: superreview?(bzbarsky) → superreview+
http://hg.mozilla.org/mozilla-central/rev/2aecc6cf5b2a
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Attachment #373280 - Flags: approval1.9.1?
Comment on attachment 373280 [details] [diff] [review]
Patch (v1)

a191=beltzner
Attachment #373280 - Flags: approval1.9.1? → approval1.9.1+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: