mirror of https://github.com/nodejs/node.git
Fast Buffer safe constructor
parent
565d862f3c
commit
2dda6be799
|
@ -91,6 +91,10 @@ function allocPool () {
|
|||
|
||||
|
||||
function Buffer (subject, encoding, legacy, slice_legacy) {
|
||||
if (!(this instanceof Buffer)) {
|
||||
return new Buffer(subject, encoding, legacy, slice_legacy);
|
||||
}
|
||||
|
||||
var length, type;
|
||||
|
||||
// Are we slicing?
|
||||
|
|
Loading…
Reference in New Issue