From d7496bff9339408ffc969975d23024453907e21a Mon Sep 17 00:00:00 2001 From: Marco Levrero Date: Tue, 19 Jun 2018 22:03:33 +0100 Subject: http,tls: name anonymous callbacks This commit is to help in the effort to name all anonymous functions to help when heap debugging. Specifically, this commit fixes some anonymous functions used as listeners in the lib/ folder. PR-URL: https://github.com/nodejs/node/pull/21412 Reviewed-By: Weijia Wang Reviewed-By: Trivikram Kamat Reviewed-By: Benjamin Gruenbaum Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Anatoli Papirovski Reviewed-By: Jon Moss Refs: https://github.com/nodejs/node/issues/8913 --- lib/_tls_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/_tls_common.js') diff --git a/lib/_tls_common.js b/lib/_tls_common.js index d8f6afed0b..de96fa687d 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -240,7 +240,7 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) { c.infoAccess = Object.create(null); // XXX: More key validation? - info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g, function(all, key, val) { + info.replace(/([^\n:]*):([^\n]*)(?:\n|$)/g, (all, key, val) => { if (key in c.infoAccess) c.infoAccess[key].push(val); else -- cgit v1.2.3