Bug 713974 - function does not always return a value JS warnings in chrome://messenger/content/accountcreation/, r=bwinton.
authorFlorian Quèze <florian@queze.net>
Tue, 10 Jan 2012 11:58:48 +0100
changeset 10383 619bee8cb53cded516e52383b0059009bd72106b
parent 10382 439e89ac3f1d161362fa98431875d1f4325fc2da
child 10384 298e996a1267f37e41239a435609fb96ffb18454
push id402
push userbugzilla@standard8.plus.com
push dateTue, 13 Mar 2012 21:17:18 +0000
treeherdercomm-beta@d080a8ebf16a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwinton
bugs713974
Bug 713974 - function does not always return a value JS warnings in chrome://messenger/content/accountcreation/, r=bwinton.
mailnews/base/prefs/content/accountcreation/emailWizard.js
mailnews/base/prefs/content/accountcreation/verifyConfig.js
--- a/mailnews/base/prefs/content/accountcreation/emailWizard.js
+++ b/mailnews/base/prefs/content/accountcreation/emailWizard.js
@@ -687,17 +687,17 @@ EmailConfigWizard.prototype =
     assert(config instanceof AccountConfig,
         "BUG: Arg 'config' needs to be an AccountConfig object");
 
     this._haveValidConfigForDomain = this._email.split("@")[1];;
 
     if (!this._realname || !this._email) {
       return;
     }
-    return this._foundConfig2(config);
+    this._foundConfig2(config);
   },
 
   // Continuation of foundConfig2() after custom fields.
   _foundConfig2 : function(config)
   {
     this.displayConfigResult(config);
   },
 
--- a/mailnews/base/prefs/content/accountcreation/verifyConfig.js
+++ b/mailnews/base/prefs/content/accountcreation/verifyConfig.js
@@ -73,18 +73,20 @@ function verifyConfig(config, alter, msg
 
   var accountManager = Cc["@mozilla.org/messenger/account-manager;1"]
                        .getService(Ci.nsIMsgAccountManager);
 
   if (accountManager.findRealServer(config.incoming.username,
                                     config.incoming.hostname,
                                     sanitize.enum(config.incoming.type,
                                                   ["pop3", "imap", "nntp"]),
-                                    config.incoming.port))
-    return errorCallback("Incoming server exists");
+                                    config.incoming.port)) {
+    errorCallback("Incoming server exists");
+    return;
+  }
 
   // incoming server
   var inServer =
     accountManager.createIncomingServer(config.incoming.username,
                                         config.incoming.hostname,
                                         sanitize.enum(config.incoming.type,
                                                     ["pop3", "imap", "nntp"]));
   inServer.port = config.incoming.port;