Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_debugger.js')
-rw-r--r--lib/_debugger.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_debugger.js b/lib/_debugger.js
index 7ec91d1e002..b183f2b586d 100644
--- a/lib/_debugger.js
+++ b/lib/_debugger.js
@@ -108,7 +108,7 @@ Protocol.prototype.execute = function(d) {
var resRawByteLength = Buffer.byteLength(res.raw, 'utf8');
if (resRawByteLength - this.bodyStartByteIndex >= this.contentLength) {
- var buf = new Buffer(resRawByteLength);
+ var buf = Buffer.allocUnsafe(resRawByteLength);
buf.write(res.raw, 0, resRawByteLength, 'utf8');
res.body =
buf.slice(this.bodyStartByteIndex,