mirror of https://github.com/nodejs/node.git
Massage util.inherits for perf increase
parent
37d529f818
commit
1ba2c32135
|
@ -423,6 +423,11 @@ exports.pump = function(readStream, writeStream, callback) {
|
||||||
exports.inherits = function(ctor, superCtor) {
|
exports.inherits = function(ctor, superCtor) {
|
||||||
ctor.super_ = superCtor;
|
ctor.super_ = superCtor;
|
||||||
ctor.prototype = Object.create(superCtor.prototype, {
|
ctor.prototype = Object.create(superCtor.prototype, {
|
||||||
constructor: { value: ctor, enumerable: false }
|
constructor: {
|
||||||
|
value: ctor,
|
||||||
|
enumerable: false,
|
||||||
|
writable: true,
|
||||||
|
configurable: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue