if the current default account is not suitable to be default, pick a better default server as soon as it becomes available
Categories
(MailNews Core :: Account Manager, defect)
Tracking
(Not tracked)
People
(Reporter: aceman, Assigned: aceman)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 9 obsolete files)
8.12 KB,
patch
|
mkmelin
:
review+
BenB
:
review-
|
Details | Diff | Splinter Review |
1.43 KB,
patch
|
BenB
:
review+
|
Details | Diff | Splinter Review |
5.80 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
Comment 1•12 years ago
|
||
Comment 8•12 years ago
|
||
![]() |
Assignee | |
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
![]() |
Assignee | |
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
![]() |
Assignee | |
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
![]() |
Assignee | |
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
![]() |
Assignee | |
Comment 18•11 years ago
|
||
Comment 19•11 years ago
|
||
![]() |
Assignee | |
Comment 20•10 years ago
|
||
Comment 21•10 years ago
|
||
![]() |
Assignee | |
Comment 22•10 years ago
|
||
![]() |
Assignee | |
Comment 23•10 years ago
|
||
Comment 24•10 years ago
|
||
![]() |
Assignee | |
Comment 25•10 years ago
|
||
![]() |
Assignee | |
Comment 26•10 years ago
|
||
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
Comment 29•10 years ago
|
||
![]() |
Assignee | |
Comment 30•10 years ago
|
||
![]() |
Assignee | |
Comment 31•10 years ago
|
||
![]() |
||
Comment 32•10 years ago
|
||
![]() |
||
Comment 33•10 years ago
|
||
Comment 34•10 years ago
|
||
![]() |
Assignee | |
Comment 35•10 years ago
|
||
![]() |
||
Comment 36•10 years ago
|
||
![]() |
Assignee | |
Comment 37•10 years ago
|
||
![]() |
||
Comment 38•10 years ago
|
||
Comment 39•9 years ago
|
||
![]() |
Assignee | |
Comment 40•6 years ago
|
||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
![]() |
Assignee | |
Comment 43•6 years ago
|
||
![]() |
Assignee | |
Comment 44•6 years ago
|
||
![]() |
Assignee | |
Comment 45•6 years ago
|
||
Comment 46•6 years ago
|
||
Comment 47•6 years ago
|
||
Comment 48•6 years ago
|
||
![]() |
Assignee | |
Comment 49•6 years ago
|
||
Comment 51•6 years ago
|
||
![]() |
Assignee | |
Comment 52•6 years ago
|
||
Comment 53•6 years ago
|
||
![]() |
Assignee | |
Comment 54•6 years ago
|
||
Comment 55•6 years ago
|
||
aceman,
I didn't comment on this, because I don't feel well about this particular patch. There are a number of changes in there that to me looks somewhat dangerous in the sense that they might break something, but I cannot pinpoint an exact situation.
Also, I do not understand why you make these changes in the first place, what the concept behind it is.
What remains is the feeling that this patch might break stuff, but it remains a feeling and nothing factual. I don't want to be resisting stuff just because I don't understand it, so I stayed silent.
Concretely, the parts that came up as red flags for me:
- // Nothing usable was found.
- return SetDefaultAccountInternal(nullptr);
Why would you do that? You can't do anything meaningful, so why not leave things as they are? Apparently, they must be working, so why touch the working status quo (of a certain default account in the profile) and "fix" it with a null account? It worked so far, so you're not really improving much, but you could break stuff, if your algo goes wrong or you overlooked a situation.
- if (m_defaultAccount.get() == aAccount)
- AutosetDefaultAccount();
- if (m_defaultAccount.get() == aAccount) {
- rv = AutosetDefaultAccount();
- NS_ENSURE_SUCCESS(rv, rv);
Why this ENSURE_SUCCESS being added? You're in Remove account? Are you sure that you want to prevent the removal of the account in case this was the default and that was the last suitable account?
If you are sure that you want to prevent it, make sure you a) leave things in a working state and b) that you inform the user why he cannot remove this account. You're not doing either of those. Specifically, it seems that the user would end up with a half-removed account and a broken setup. That's why I think this particular change is wrong.
(Personally, I'd prefer to keep code style changes and logic changes in separate patches. I find these irrelevant changes distracting.)
- You're calling GetDefaultAccount() and if there's no default account autoset default account on every load. Do we need that? Is that the core of what you're trying to achieve here, that we ensure on startup that we set a proper default account?
If that's your goal, please describe that clearly, why you think we should do that, which specific situation this improves, and limit the patch only to this one single change.
I think you could ignore my comment 4. and 1. if you have a good reason, 3. is style and I think 2. is important to fix.
I'm going to give r- for point 2. specifically, because it really concerns me.
Sorry for being so negative about the patch. I didn't want to be negative and wasn't sure, so I stayed silent, but since you insisted on my comment...
Comment 56•6 years ago
|
||
Updated•2 years ago
|
Description
•