Closed Bug 357243 Opened 18 years ago Closed 17 years ago

Can not add certain item into cookie "Exceptions" list after clicking "Remove All Sites"

Categories

(Firefox :: Settings UI, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 alpha4

People

(Reporter: tony.hao, Assigned: Jia-Qin.Shi)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1b2) Gecko/20061009 Firefox/2.0b2
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1b2) Gecko/20061009 Firefox/2.0b2

After some operations and "Remove All Sites" in the cookie "Exceptions", I can not add certain item into list again unless I dismiss Edit->Preference dialogue and invoke it again.

Reproducible: Always

Steps to Reproduce:
1.Choose Privacy tab in Edit->Preference 
2.In the Cookies section, click "Exceptions" button
3.Add www.google.com into list and set it to "Allow"
4.Add www.google.com into list and set it to "Block"
5.Click "Remove All Sites" button
6.Try to add www.google.com into list again

Actual Results:  
Can not add www.google.com into list any more.

Expected Results:  
Should be able to add any items user required.
OS: Solaris → Opensolaris
I can confirm this behavior with:
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0

Even reproduce steps 3. and 4. are not needed, after clicking at "remove all sites" the dialog has to be closed before new sites could be added.
Confirm this bug on FireFox trunk build :
Mozilla/5.0(X11;U;SunOS sun4u;en-US;rv:1.9a3pre) Gecko/2007022801 Minefield/3.0a3pre
Status: UNCONFIRMED → NEW
Ever confirmed: true
Confirmed for Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1) Gecko/20061211 Firefox/2.0 on Solaris Nevada. And also Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9a2) Gecko/20070220 Firefox/3.0a2.

It seems to be not a Solaris specific bug as comment 1.

=>Change Hardware and OS.
OS: Opensolaris → All
Hardware: Sun → All
Attached patch Patch V1 (obsolete) — Splinter Review
I wonder whether I should also modify the file "Permissionsutils.js". In the function deleteAll, "aItems = [];" seems no effect on this._permission, and I am not sure delete it or not.
Attachment #260573 - Flags: review?(mano)
hrm, I think the you could fix that by changing aItems = [] to aItems.splice(0), please test.
Attached patch Patch V2Splinter Review
Great! I use mano's suggestion, and it does work well. Thanks!
Attachment #260683 - Flags: review?(mano)
Attachment #260683 - Flags: review?(mano)
Attachment #260683 - Attachment is obsolete: true
Attachment #260683 - Attachment is obsolete: false
Attachment #260573 - Attachment is obsolete: true
Attachment #260573 - Flags: review?(mano)
Comment on attachment 260683 [details] [diff] [review]
Patch V2

r=mano.
Attachment #260683 - Flags: review+
mano, thanks for the review. Do we need a sr for this before checking?
No.
Assignee: nobody → Jia-Qin.Shi
Checking in browser/components/preferences/permissionsutils.js;
/cvsroot/mozilla/browser/components/preferences/permissionsutils.js,v  <--  permissionsutils.js
new revision: 1.5; previous revision: 1.4
done

=>FIXED
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 alpha4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: