This change allows passing Buffer's MAX_LENGTH constant as the maxBuffer option (or values larger than MAX_LENGTH). Fixes a bug where other errors would be hidden by a RangeError (e.g. "RangeError: "size" argument must not be larger than 2147483647") when the error handling code tried to call getBufferedValue while buffering a stream larger than Buffer's MAX_LENGTH.
This change allows passing Buffer's
MAX_LENGTH
constant as themaxBuffer
option (or values larger thanMAX_LENGTH
). Fixes a bug where other errors would be hidden by aRangeError
(e.g. "RangeError: "size" argument must not be larger than 2147483647") when the error handling code tried to callgetBufferedValue
while buffering a stream larger than Buffer'sMAX_LENGTH
.