Closed
Bug 203859
Opened 21 years ago
Closed 21 years ago
Deleted address book reappear after an exit/restart
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect)
SeaMonkey
MailNews: Address Book & Contacts
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: nbaca, Assigned: caillon)
Details
(Keywords: regression)
Attachments
(3 files)
17.57 KB,
patch
|
Details | Diff | Splinter Review | |
16.07 KB,
patch
|
sspitzer
:
superreview+
sspitzer
:
approval1.4b+
|
Details | Diff | Splinter Review |
2.87 KB,
patch
|
Details | Diff | Splinter Review |
Trunk build 2003-04-29: WinXP, Mac 10.1.5 Overview: Delete a user defined address book and after an exit/restart the address book reappears. Steps to reproduce: 1. Create an address book (i.e. AB1) 2. Add cards, but it is not necessary 3. Exit/restart and the address book is still present (AB1) 4. Delete the address book 5. Exit/restart Actual Results: - Address Books with cards: results in the address book name reappearing in the left pane but the cards are gone. - Address Book without cards: results in the address book name reappearing. - In one session create an address book, then delete the address book. After an exit/restart then this address book Is deleted. Expected Results: The Address Book should not reappear. Additional Information: Bug 173430 most likely caused this regression according to Seth.
Reporter | ||
Comment 1•21 years ago
|
||
This was working in the 4/28 builds but regressed in the 4/29 builds. Seth says this is a 1.4b blocker.
Comment 3•21 years ago
|
||
assuming nbaca meant to nominate and setting the correct flag for that.
Flags: blocking1.4b+ → blocking1.4b?
Comment 4•21 years ago
|
||
blocking. the fix for bug #173430 has caused at least two regression, both we should fix before shipping 1.4 beta.
Flags: blocking1.4b? → blocking1.4b+
Assignee | ||
Comment 5•21 years ago
|
||
This fixes both this bug and bug 203945. The problem was an oversight on my part. nsDirPrefs relied on dupes being removed from the child list after the trailing branch got chomped off and I forgot to account for that in my patch to 173430. So this puts in equivalent code by adding a helper function here. I also did a little bit of cleanup since the code was pretty unreadable in a few places. diff -w to follow.
Assignee | ||
Comment 6•21 years ago
|
||
Comment 7•21 years ago
|
||
Who can review this? Time is short on 1.4b.
Comment 8•21 years ago
|
||
Comment on attachment 122194 [details] [diff] [review] diff -w >+ for (PRUint32 i = *aCount; i--;) { Is this right? I don't see an exit from this loop anywhere. caillon: timeless mentioned that you're looking for a hashtable to do the dup-removal instead of that quicksort. It looks simple to me, I'm working on a little demo code.
Comment 9•21 years ago
|
||
m'apologies, I read the code wrong, it is of course correct.
Comment 10•21 years ago
|
||
assume a=sspitzer for 1.4 beta, once you get reviews. chris and I have an agreement, that if there are more problems (once this fix lands), that this and the original fix for bug #173430, will be backed out, and will re-land in 1.5 thanks chris.
Target Milestone: --- → mozilla1.4beta
Comment 11•21 years ago
|
||
testing / reviewing that patch now.
Comment 12•21 years ago
|
||
Comment on attachment 122194 [details] [diff] [review] diff -w r/sr/a=sspitzer
Attachment #122194 -
Flags: superreview+
Attachment #122194 -
Flags: approval1.4b+
Comment 13•21 years ago
|
||
note, chris tells me he's re-run flawfinder on this code, too.
Assignee | ||
Comment 14•21 years ago
|
||
Fix is in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.4beta → ---
Comment 15•21 years ago
|
||
Tested with build 200305002 on winxp, macosx and linux this is fixed. Note I tested deleting an LDAP directory too since I found that it had the same problem as address books. Verified.
Status: RESOLVED → VERIFIED
Comment 16•21 years ago
|
||
this is a small optimization to the function dir_GetChildList we created. as it stands, for a "typical end-user" (in this case, me ;) addrbook setup, the number of entries returned by nsIPrefBranch::GetChildList is 60-odd, but the number of unique entries is only 15. so memmoving for every non-unique entry is quite slow - better approach is to move only unique entries (which is a simple ptr assignment). yeah, i know this isn't really important in the scheme of things, but i felt guilty about writing slow code. ;) i've tested this and it looks to work just fine. it's not a biggie so it can wait 'til whenever is convenient to land.
Comment 17•21 years ago
|
||
Comment on attachment 122478 [details] [diff] [review] small optimization (i know this bug is v/fixed, but this patch really doesn't deserve its own bug, so i'm just chucking it here.)
Attachment #122478 -
Flags: review?(caillon)
Updated•21 years ago
|
Attachment #122478 -
Flags: review?(caillon)
Comment 18•21 years ago
|
||
ok, caillon thinks it does deserve its own bug. ;) opened bug 204753 for it.
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•