Fast Buffer safe constructor
This commit is contained in:
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…
x
Reference in New Issue
Block a user