Closed
Bug 11509
Opened 25 years ago
Closed 25 years ago
[code] nsMsgAccountManager::prefService() needs to be more robust
Categories
(MailNews Core :: Backend, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M11
People
(Reporter: jband_mozilla, Assigned: alecf)
Details
[choosing a buzilla 'component' at random, 'assignedto' based on cvsblame] nsMsgAccountManager::prefService() is part of what is called in just creating the components with progids that begin with: component://netscape/messengercompose/compose component://netscape/messenger component://netscape/rdf/datasource?name=msgaccountmanager component://netscape/rdf/datasource?name=mailnewsfolders component://netscape/rdf/datasource?name=msgnotifications component://netscape/rdf/datasource?name=mailnewsmessages (there may be others?) It has the wonderful assert: NS_ASSERTION(NS_SUCCEEDED(rv), "prefs service not available. I will crash soon!"); It delivers what it promises. These components register themselves with the component manager and can be instantiated from JS - with or without a prefs service handy. Creating a component, doing a few QI calls and then Releasing it should never crash the process. But here is does. Please make this more robust.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•25 years ago
|
||
erg. I guess I was kind of expecting that prefs would be available, but I see your point. I guess I better start using NS_WITH_SERVICE to load this service on demand instead.
Updated•25 years ago
|
Target Milestone: M10
Comment 2•25 years ago
|
||
moving to M10
Assignee | ||
Updated•25 years ago
|
Summary: nsMsgAccountManager::prefService() needs to be more robust → [code] nsMsgAccountManager::prefService() needs to be more robust
Assignee | ||
Comment 3•25 years ago
|
||
I've made the following interface implementations much more robust with respect to prefs: nsMsgAccount nsMsgAccountManager nsMsgIdentity I still have nsMsgIncomingServer to go. (all to be checked in for M10)
Assignee | ||
Updated•25 years ago
|
Target Milestone: M10 → M11
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•25 years ago
|
||
ok, done. I even tried your cool enum script, and it works beautifully.
The usual way of making it more robust is the following: if (m_prefs) return NS_OK; return nsServiceManager::GetService(kPrefServiceCID, nsCOMTypeInfo<nsIPref>::GetIID(), (nsISupports**)&m_prefs, this); Based on looking at the code, VERIFIED
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
•