(that, length)
| 78438 | } |
| 78439 | |
| 78440 | function createBuffer (that, length) { |
| 78441 | if (kMaxLength() < length) { |
| 78442 | throw new RangeError('Invalid typed array length') |
| 78443 | } |
| 78444 | if (Buffer.TYPED_ARRAY_SUPPORT) { |
| 78445 | // Return an augmented `Uint8Array` instance, for best performance |
| 78446 | that = new Uint8Array(length) |
| 78447 | that.__proto__ = Buffer.prototype |
| 78448 | } else { |
| 78449 | // Fallback: Return an object instance of the Buffer class |
| 78450 | if (that === null) { |
| 78451 | that = new Buffer(length) |
| 78452 | } |
| 78453 | that.length = length |
| 78454 | } |
| 78455 | |
| 78456 | return that |
| 78457 | } |
| 78458 | |
| 78459 | /** |
| 78460 | * The Buffer constructor returns instances of `Uint8Array` that have their |
no test coverage detected