Closed Bug 1211597 Opened 9 years ago Closed 9 years ago

Incorrect code in verifyConfig.js / verifyConfig

Categories

(MailNews Core :: Account Manager, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mkaply, Assigned: mkaply)

References

Details

The code here: http://mxr.mozilla.org/comm-central/source/mailnews/base/prefs/content/accountcreation/verifyConfig.js#116 Is incorrect. There is an errorCallback with (e), but we're not in a try catch at this point. So if we get to the end of this function, there will be an error about e not being defined. Checked in with bug 1155491
Blocks: 1155491
112 catch (e) { 113 gEmailWizardLogger.error("ERROR: verify logon shouldn't have failed"); 114 } 115 // Avoid pref pollution, clear out server prefs. 116 MailServices.accounts.removeIncomingServer(inServer, true); 117 errorCallback(e); 118 } From the code above this, it looks like these two lines should also be inside the catch block?
Flags: needinfo?(rkent)
Flags: needinfo?(Pidgeot18)
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Trunk
> From the code above this, it looks like these two lines should also be inside the catch block? That's my thought. I'll put together a patch and have rkent review.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(rkent)
Flags: needinfo?(Pidgeot18)
It would be great if you could test and explain why the current code works, as I am not aware of any reported symptoms of this problem.
(In reply to Kent James (:rkent) from comment #3) > It would be great if you could test and explain why the current code works, > as I am not aware of any reported symptoms of this problem. It won't cause a problem in todays code unless something fails. I was porting this code to another mail client and I had a bug in my code which exposed this code. Nothing will break today because this is the tail end of this function. You'll just see a message on the console and wonder why it is there. It's just a correctness issue.
Yes currently the only time you'd get there is when e is defined.
This isn't worth fixing. I have no idea why I saw the problem in Postbox code.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.