readline,zlib: named anonymous functions

PR-URL: https://github.com/nodejs/node/pull/21792
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
This commit is contained in:
Anto Aravinth 2018-07-14 18:52:49 +05:30 committed by Trivikram Kamat
parent 1f56c566c4
commit fc6f49a704
2 changed files with 4 additions and 4 deletions

View File

@ -843,7 +843,7 @@ Interface.prototype._ttyWrite = function(s, key) {
if (this.listenerCount('SIGTSTP') > 0) { if (this.listenerCount('SIGTSTP') > 0) {
this.emit('SIGTSTP'); this.emit('SIGTSTP');
} else { } else {
process.once('SIGCONT', (function(self) { process.once('SIGCONT', (function continueProcess(self) {
return function() { return function() {
// Don't raise events if stream has already been abandoned. // Don't raise events if stream has already been abandoned.
if (!self.paused) { if (!self.paused) {

View File

@ -473,7 +473,7 @@ function processChunkSync(self, chunk, flushFlag) {
var chunkSize = self._chunkSize; var chunkSize = self._chunkSize;
var error; var error;
self.on('error', function(er) { self.on('error', function onError(er) {
error = er; error = er;
}); });
@ -691,11 +691,11 @@ inherits(Unzip, Zlib);
function createConvenienceMethod(ctor, sync) { function createConvenienceMethod(ctor, sync) {
if (sync) { if (sync) {
return function(buffer, opts) { return function syncBufferWrapper(buffer, opts) {
return zlibBufferSync(new ctor(opts), buffer); return zlibBufferSync(new ctor(opts), buffer);
}; };
} else { } else {
return function(buffer, opts, callback) { return function asyncBufferWrapper(buffer, opts, callback) {
if (typeof opts === 'function') { if (typeof opts === 'function') {
callback = opts; callback = opts;
opts = {}; opts = {};