Unverified Commit c21458a1 authored by Sakthipriyan Vairamani's avatar Sakthipriyan Vairamani Committed by Anna Henningsen
Browse files

buffer: expose underlying buffer object always

If the Buffer object's length is zero, or equal to the underlying
buffer object's length, `parent` property returns `undefined`.

    > new Buffer(0).parent
    undefined
    > new Buffer(Buffer.poolSize).parent
    undefined

This patch makes the buffer objects to consistently expose the buffer
object via the `parent` property, always.

Fixes: https://github.com/nodejs/node/issues/8266
PR-URL: https://github.com/nodejs/node/pull/8311


Reviewed-By: default avatarTrevor Norris <trev.norris@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent e9b6fbbf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment