Closed
Bug 124208
Opened 23 years ago
Closed 22 years ago
Address Book window shows LDAP directories from previous Profile in turbo mode
Categories
(MailNews Core :: LDAP Integration, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: yulian, Assigned: sspitzer)
References
Details
(Whiteboard: nab-ldap [adt2])
Attachments
(1 file, 5 obsolete files)
2002020703 Wins build on NT. WIth new Profile to launch Address Book window, all the LDAP directories from previous profile displayed in the Address Book Pane. Checking with Preferences|Mail&Newsgroup|Addressing and Mail&Newsgroups Account Settings|Addressing, there is no LDAP directory created yet for the new Profile. Steps to reproduce: 1. Launch N6 & Address Book window with existing Profile 2. All the LDAP directories appear in the Address Book window 3. Exit N6 4. Launch Profile manager, create a new Profile and launch N6 with it 5. Launch Address Book window Actual result: LDAP directories from previous Profile appear in the Address Book Window. Expected result: No directory displayed in Address Book Window
Reporter | ||
Updated•23 years ago
|
Whiteboard: nab-ldap
Assignee | ||
Comment 1•23 years ago
|
||
are you using turbo?
Reporter | ||
Comment 2•23 years ago
|
||
Yes, if not using turbo, the problem is gone!
Reporter | ||
Comment 3•22 years ago
|
||
20020401 trunk builds This problem still exists in trubo mode.
Summary: Address Book window shows LDAP directories from previous Profile → Address Book window shows LDAP directories from previous Profile in turbo mode
Comment 4•22 years ago
|
||
nominating for MachV, since QuickLaunch is on by default. cc law
Keywords: nsbeta1
Comment 5•22 years ago
|
||
reassigning to Cavin.
Comment 6•22 years ago
|
||
The addressbook service, as far as I know, is not observing profile changes. If it's not, of course this will happen and it's probably fairly easy to fix. Also, then it's my fault :-/ I could use suggestions with how to hook up the observer: (1) What is the object that holds the addressbook data from the user profile? (2) When it's time to internalize the data from the profile, is it done lazily or at some defined moment?
Assignee | ||
Comment 7•22 years ago
|
||
taking. I'll work with ccarlen on fixing how the addressbook works. he's right, it's not observing profile changes at all.
Assignee: cavin → sspitzer
Assignee | ||
Comment 8•22 years ago
|
||
starting on this now.
Status: NEW → ASSIGNED
Whiteboard: nab-ldap [adt2] → nab-ldap [adt2] [starting on this, 4/16]
Assignee | ||
Comment 9•22 years ago
|
||
ok, the first problem is that nsDirPrefs caches the list of directories. it needs to observe "profile-do-change", and reset state. working on this now...
Assignee | ||
Comment 10•22 years ago
|
||
I've got an initial patch started that calls DIR_Shutdown() when the profiles change, and so when we relaunch, we re-get the prefs. working on the asserts and kinks now. I should have a patch for review by tomorrow.
Whiteboard: nab-ldap [adt2] [starting on this, 4/16] → nab-ldap [adt2] [ETA for patch 4/17]
Assignee | ||
Comment 11•22 years ago
|
||
Assignee | ||
Comment 12•22 years ago
|
||
Attachment #79639 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 13•22 years ago
|
||
Attachment #79643 -
Attachment is obsolete: true
Assignee | ||
Comment 14•22 years ago
|
||
Attachment #79647 -
Attachment is obsolete: true
Comment 15•22 years ago
|
||
Comment on attachment 79647 [details] [diff] [review] same as before, with more comments. > >-nsAbDirectoryDataSource::~nsAbDirectoryDataSource (void) >+nsAbDirectoryDataSource::~nsAbDirectoryDataSource() > { >+ // release ourselves from the observer service >+ nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1"); >+ if (observerService) { >+ observerService->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID); >+ observerService->RemoveObserver(this, "profile-do-change"); >+ } >+} Since you're going to the effort to support weak refs and using that on the call to AddObserver, what need is there to remove yourself as an observer in the destructor? The rest looks good - not that I'm that familiar with the code. > >+ >+ rv = observerService->AddObserver(this, "profile-do-change", PR_TRUE); >+ NS_ENSURE_SUCCESS(rv,rv); >+ >+ rv = observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE); >+ NS_ENSURE_SUCCESS(rv,rv); > >- mInitialized = PR_TRUE; > return NS_OK; > } > >-NS_IMPL_ISUPPORTS_INHERITED1(nsAbDirectoryDataSource, nsAbRDFDataSource, nsIAbListener) >+NS_IMPL_ISUPPORTS_INHERITED3(nsAbDirectoryDataSource, nsAbRDFDataSource, nsIAbListener, nsIObserver, nsISupportsWeakReference) >
Comment 16•22 years ago
|
||
Comment on attachment 79651 [details] [diff] [review] latest patch. r/sr = bienvenu - there are some changes that aren't needed to fix this bug in the patch, and Seth is going to make a more minimal patch for the branch.
Attachment #79651 -
Flags: superreview+
Assignee | ||
Comment 17•22 years ago
|
||
Attachment #79651 -
Attachment is obsolete: true
Assignee | ||
Comment 18•22 years ago
|
||
>Since you're going to the effort to support weak refs and using that on the
>call to AddObserver, what need is there to remove yourself as an observer in
>the destructor?
nsObserverList::AddObserver() asserts if my observer does not support weak ref.
Is it our convention to use weak ref observers, and just add them, and not
remove them?
Comment 19•22 years ago
|
||
> nsObserverList::AddObserver() asserts if my observer does not support weak ref.
Only if you pass TRUE as the last param to addObserver, right?
Is it our convention to use weak ref observers, and just add them, and not
remove them?
Doing that cuts down on calls to getService() from destructors at shutdown time
(which will fail).
Assignee | ||
Comment 20•22 years ago
|
||
Attachment #79653 -
Attachment is obsolete: true
Assignee | ||
Comment 21•22 years ago
|
||
ccarlen, thanks for the info. I've fixed the patch.
Comment 22•22 years ago
|
||
Comment on attachment 79670 [details] [diff] [review] patch, don't call RemoveObserver() in the dtor, as per ccarlen's suggestion. add a comment above the call to AddObserver(), fix some tabs / whitespace. r=bienvenu
Attachment #79670 -
Flags: review+
Assignee | ||
Updated•22 years ago
|
Whiteboard: nab-ldap [adt2] [ETA for patch 4/17] → nab-ldap [adt2] [have fix, have r=, waiting for sr=]
Comment 23•22 years ago
|
||
Comment on attachment 79670 [details] [diff] [review] patch, don't call RemoveObserver() in the dtor, as per ccarlen's suggestion. add a comment above the call to AddObserver(), fix some tabs / whitespace. sr=mscott
Attachment #79670 -
Flags: superreview+
Assignee | ||
Comment 24•22 years ago
|
||
*** Bug 134289 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•22 years ago
|
Whiteboard: nab-ldap [adt2] [have fix, have r=, waiting for sr=] → nab-ldap [adt2] [have fix, have r,sr, waiting to land]
Assignee | ||
Updated•22 years ago
|
Whiteboard: nab-ldap [adt2] [have fix, have r,sr, waiting to land] → nab-ldap [adt2] [fix in hand, have r=, sr=, will land on trunk today]
Assignee | ||
Comment 25•22 years ago
|
||
fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Keywords: adt1.0.0
Resolution: --- → FIXED
Whiteboard: nab-ldap [adt2] [fix in hand, have r=, sr=, will land on trunk today] → nab-ldap [adt2] [fixed on trunk]
Comment 26•22 years ago
|
||
Yulian - Can you verify this fix on the trunk today, and that no related regressions occur?
Reporter | ||
Comment 27•22 years ago
|
||
20020419 Trunk build on Win2K Verified.
Reporter | ||
Comment 28•22 years ago
|
||
20020419 Trunk build on WIns The problem has been fixed.
Status: RESOLVED → VERIFIED
Comment 29•22 years ago
|
||
adding adt1.0.0+. Please check into the branch as soon as possible and add fixed1.0.0
Reporter | ||
Comment 30•22 years ago
|
||
Has been checked into the branch yet? No keyword: fixed1.0.0
Assignee | ||
Comment 31•22 years ago
|
||
this has not been checked on the branch yet. I'll do that today.
Assignee | ||
Comment 32•22 years ago
|
||
fixed on the branch as well. setting fixed1.0.0
Keywords: adt1.0.0+ → fixed1.0.0
Assignee | ||
Updated•22 years ago
|
Whiteboard: nab-ldap [adt2] [fixed on trunk] → nab-ldap [adt2]
Reporter | ||
Comment 33•22 years ago
|
||
20020425 branch build on Wins Verified in branch build
Keywords: fixed1.0.0 → verified1.0.0
Comment 34•22 years ago
|
||
*** Bug 136274 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 35•22 years ago
|
||
20020603 branch build on Win2K Verified with New Turbo Model. No regression.
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•