Anonymise some functions to work around Safari bug

Some Safari versions will error with a syntax error if a function has the same name as
one of its parameter.
Found the bug in safari included with iOS 9.3.5.
Fixed for me with this patch.
This commit is contained in:
Samuel Tribehou 2017-01-09 18:14:50 +01:00 committed by Trent Mick
parent 027cf5aab1
commit 2d535a6395

View file

@ -1087,7 +1087,7 @@ Logger.prototype.fatal = mkLogEmitter(FATAL);
Logger.stdSerializers = {}; Logger.stdSerializers = {};
// Serialize an HTTP request. // Serialize an HTTP request.
Logger.stdSerializers.req = function req(req) { Logger.stdSerializers.req = function (req) {
if (!req || !req.connection) if (!req || !req.connection)
return req; return req;
return { return {
@ -1105,7 +1105,7 @@ Logger.stdSerializers.req = function req(req) {
}; };
// Serialize an HTTP response. // Serialize an HTTP response.
Logger.stdSerializers.res = function res(res) { Logger.stdSerializers.res = function (res) {
if (!res || !res.statusCode) if (!res || !res.statusCode)
return res; return res;
return { return {
@ -1138,7 +1138,7 @@ function getFullErrorStack(ex)
// Serialize an Error object // Serialize an Error object
// (Core error properties are enumerable in node 0.4, not in 0.6). // (Core error properties are enumerable in node 0.4, not in 0.6).
var errSerializer = Logger.stdSerializers.err = function err(err) { var errSerializer = Logger.stdSerializers.err = function (err) {
if (!err || !err.stack) if (!err || !err.stack)
return err; return err;
var obj = { var obj = {