Rich Trott
8 years ago
committed by
Myles Borins
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946
9 changed files with
30 additions and
30 deletions
lib/_tls_legacy.js
lib/_tls_wrap.js
lib/buffer.js
lib/fs.js
lib/internal/child_process.js
lib/readline.js
lib/tls.js
lib/url.js
lib/util.js
@ -361,7 +361,7 @@ Object.defineProperty(CryptoStream.prototype, 'bytesWritten', {
CryptoStream . prototype . getPeerCertificate = function ( detailed ) {
if ( this . pair . ssl ) {
return common . translatePeerCertificate (
this . pair . ssl . getPeerCertificate ( detailed ) ) ;
this . pair . ssl . getPeerCertificate ( detailed ) ) ;
}
return null ;
@ -641,7 +641,7 @@ TLSSocket.prototype.setSession = function(session) {
TLSSocket . prototype . getPeerCertificate = function ( detailed ) {
if ( this . _ handle ) {
return common . translatePeerCertificate (
this . _ handle . getPeerCertificate ( detailed ) ) ;
this . _ handle . getPeerCertificate ( detailed ) ) ;
}
return null ;
@ -626,7 +626,7 @@ function slowIndexOf(buffer, val, byteOffset, encoding, dir) {
case 'ascii' :
case 'hex' :
return binding . indexOfBuffer (
buffer , Buffer . from ( val , encoding ) , byteOffset , encoding , dir ) ;
buffer , Buffer . from ( val , encoding ) , byteOffset , encoding , dir ) ;
default :
if ( loweredCase ) {
@ -148,20 +148,21 @@ function isFd(path) {
// Static method to set the stats properties on a Stats object.
function Stats (
dev ,
mode ,
nlink ,
uid ,
gid ,
rdev ,
blksize ,
ino ,
size ,
blocks ,
atim_msec ,
mtim_msec ,
ctim_msec ,
birthtim_msec ) {
dev ,
mode ,
nlink ,
uid ,
gid ,
rdev ,
blksize ,
ino ,
size ,
blocks ,
atim_msec ,
mtim_msec ,
ctim_msec ,
birthtim_msec
) {
this . dev = dev ;
this . mode = mode ;
this . nlink = nlink ;
@ -355,11 +355,11 @@ ChildProcess.prototype.spawn = function(options) {
}
this . stdin = stdio . length >= 1 && stdio [ 0 ] . socket !== undefined ?
stdio [ 0 ] . socket : null ;
stdio [ 0 ] . socket : null ;
this . stdout = stdio . length >= 2 && stdio [ 1 ] . socket !== undefined ?
stdio [ 1 ] . socket : null ;
stdio [ 1 ] . socket : null ;
this . stderr = stdio . length >= 3 && stdio [ 2 ] . socket !== undefined ?
stdio [ 2 ] . socket : null ;
stdio [ 2 ] . socket : null ;
this . stdio = stdio . map ( function ( stdio ) {
return stdio . socket === undefined ? null : stdio . socket ;
@ -683,12 +683,12 @@ Interface.prototype._moveCursor = function(dx) {
var diffWidth ;
if ( diffCursor < 0 ) {
diffWidth = - getStringWidth (
this . line . substring ( this . cursor , oldcursor )
) ;
this . line . substring ( this . cursor , oldcursor )
) ;
} else if ( diffCursor > 0 ) {
diffWidth = getStringWidth (
this . line . substring ( this . cursor , oldcursor )
) ;
this . line . substring ( this . cursor , oldcursor )
) ;
}
exports . moveCursor ( this . output , diffWidth , 0 ) ;
this . prevRows = newPos . rows ;
@ -197,7 +197,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) {
if ( ! valid ) {
const err = new Error (
` Hostname/IP doesn't match certificate's altnames: " ${ reason } " ` ) ;
` Hostname/IP doesn't match certificate's altnames: " ${ reason } " ` ) ;
err . reason = reason ;
err . host = host ;
err . cert = cert ;
@ -738,8 +738,7 @@ Url.prototype.resolveObject = function(relative) {
var isSourceAbs = ( result . pathname && result . pathname . charAt ( 0 ) === '/' ) ;
var isRelAbs = (
relative . host ||
relative . pathname && relative . pathname . charAt ( 0 ) === '/'
relative . host || relative . pathname && relative . pathname . charAt ( 0 ) === '/'
) ;
var mustEndAbs = ( isRelAbs || isSourceAbs ||
( result . host && relative . pathname ) ) ;
@ -843,8 +842,8 @@ Url.prototype.resolveObject = function(relative) {
// then it must NOT get a trailing slash.
var last = srcPath . slice ( - 1 ) [ 0 ] ;
var hasTrailingSlash = (
( result . host || relative . host || srcPath . length > 1 ) &&
( last === '.' || last === '..' ) || last === '' ) ;
( result . host || relative . host || srcPath . length > 1 ) &&
( last === '.' || last === '..' ) || last === '' ) ;
// strip single dots, resolve double dots to parent dir
// if the path tries to go above the root, `up` ends up > 0
@ -691,7 +691,7 @@ function formatTypedArray(ctx, value, recurseTimes, visibleKeys, keys) {
for ( const key of keys ) {
if ( typeof key === 'symbol' || ! numbersOnlyRE . test ( key ) ) {
output . push (
formatProperty ( ctx , value , recurseTimes , visibleKeys , key , true ) ) ;
formatProperty ( ctx , value , recurseTimes , visibleKeys , key , true ) ) ;
}
}
return output ;