Bug 1330014 - Remove extra lines that eslint --fix adds for no-useless-return. r=standard8

MozReview-Commit-ID: Be36laqLQQ2

--HG--
extra : rebase_source : 05c863e038aa1a6571500f4178c325b1b9913af9
This commit is contained in:
Jared Wein 2017-01-10 12:08:32 -05:00
parent 81cb5e57b9
commit dd7ec3a99b
8 changed files with 6 additions and 29 deletions

View File

@ -102,7 +102,7 @@ RESTRequest.prototype = {
Ci.nsIChannelEventSink
]),
/** * Public API: ***/
/** Public API: **/
/**
* A constant boolean that indicates whether this object will automatically
@ -293,7 +293,7 @@ RESTRequest.prototype = {
}
},
/** * Implementation stuff ***/
/** Implementation stuff **/
dispatch: function dispatch(method, data, onComplete, onProgress) {
if (this.status != this.NOT_SENT) {
@ -412,7 +412,7 @@ RESTRequest.prototype = {
this.onComplete(error);
},
/** * nsIStreamListener ***/
/** nsIStreamListener **/
onStartRequest: function onStartRequest(channel) {
if (this.status == this.ABORTED) {
@ -573,13 +573,13 @@ RESTRequest.prototype = {
this.delayTimeout();
},
/** * nsIInterfaceRequestor ***/
/** nsIInterfaceRequestor **/
getInterface(aIID) {
return this.QueryInterface(aIID);
},
/** * nsIBadCertListener2 ***/
/** nsIBadCertListener2 **/
notifyCertProblem: function notifyCertProblem(socketInfo, sslStatus, targetHost) {
this._log.warn("Invalid HTTPS certificate encountered!");
@ -601,7 +601,7 @@ RESTRequest.prototype = {
return isInternal && isSameURI;
},
/** * nsIChannelEventSink ***/
/** nsIChannelEventSink **/
asyncOnChannelRedirect:
function asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {

View File

@ -312,7 +312,6 @@ add_task(function* test_retry_request_on_fail() {
let message = "i love you!!!";
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(message, message.length);
}
});
@ -461,7 +460,6 @@ add_task(function* test_401_then_500() {
let message = "Cannot get ye flask.";
response.setStatusLine(request.httpVersion, 500, "Internal server error");
response.bodyOutputStream.write(message, message.length);
}
});

View File

@ -75,7 +75,6 @@ add_test(function test_intl_accept_language() {
do_print("Checked " + testCount + " languages. Removing checkLanguagePref as pref observer.");
Services.prefs.removeObserver("intl.accept_languages", checkLanguagePref);
run_next_test();
});
}
});

View File

@ -279,26 +279,22 @@ add_task(function* test_signIn() {
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(sessionMessage_noKey,
sessionMessage_noKey.length);
} else if (jsonBody.email == "you@example.com") {
do_check_eq("keys=true", request._queryString);
do_check_eq(jsonBody.authPW, "93d20ec50304d496d0707ec20d7e8c89459b6396ec5dd5b9e92809c5e42856c7");
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(sessionMessage_withKey,
sessionMessage_withKey.length);
} else if (jsonBody.email == "You@example.com") {
// Error trying to sign in with a wrong capitalization
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage_wrongCap,
errorMessage_wrongCap.length);
} else {
// Error trying to sign in to nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage_notExistent,
errorMessage_notExistent.length);
}
},
});
@ -354,7 +350,6 @@ add_task(function* test_signOut() {
// Error trying to sign out of nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -393,7 +388,6 @@ add_task(function* test_recoveryEmailStatus() {
// Second call gets an error trying to query a nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -422,7 +416,6 @@ add_task(function* test_recoveryEmailStatusWithReason() {
response.setStatusLine(request.httpVersion, 200, "OK");
response.bodyOutputStream.write(emailStatus, emailStatus.length);
},
});
@ -452,7 +445,6 @@ add_task(function* test_resendVerificationEmail() {
// Second call gets an error trying to query a nonexistent account
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});
@ -575,7 +567,6 @@ add_task(function* test_signCertificate() {
// Second attempt, trigger error
response.setStatusLine(request.httpVersion, 400, "Bad request");
response.bodyOutputStream.write(errorMessage, errorMessage.length);
},
});

View File

@ -493,7 +493,6 @@ AddonUtilsInternal.prototype = {
if (!addon.appDisabled) {
cb(null, addon);
}
// Else the listener will handle invoking the callback.
},

View File

@ -250,7 +250,6 @@ Tracker.prototype = {
if (data == PREFS_BRANCH + "engine." + this.engine.prefName) {
this.onEngineEnabledChanged(this.engine.enabled);
}
}
}
};

View File

@ -135,13 +135,10 @@ UserAPI10Client.prototype = {
let body = request.response.body;
if (body == "0") {
cb(null, false);
} else if (body == "1") {
cb(null, true);
} else {
cb(new Error("Unknown response from server: " + body), null);
}
},
@ -178,7 +175,6 @@ UserAPI10Client.prototype = {
}
cb(error, null);
},
_onChangePassword: function _onChangePassword(cb, request, error) {
@ -218,7 +214,6 @@ UserAPI10Client.prototype = {
error.body = response.body;
cb(error, null);
},
};
Object.freeze(UserAPI10Client.prototype);

View File

@ -572,10 +572,8 @@ var TPS = {
Logger.logInfo("mozmill endTest: " + JSON.stringify(obj));
if (obj.failed > 0) {
this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + JSON.stringify(obj.fails));
} else if ('skipped' in obj && obj.skipped) {
this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + obj.skipped_reason);
} else {
Utils.namedTimer(function() {
this.FinishAsyncOperation();
@ -885,7 +883,6 @@ var TPS = {
Utils.nextTick(this._executeTestPhase.bind(this, file, phase, settings));
} catch (e) {
this.DumpError("RunTestPhase failed", e);
}
},
@ -948,7 +945,6 @@ var TPS = {
this._currentAction = 0;
} catch (e) {
this.DumpError("_executeTestPhase failed", e);
}
},