Fix more Buffer deprecation warnings
Summary: Missed two the previous time Reviewed By: jknoxville Differential Revision: D18372147 fbshipit-source-id: 015f1aa93706134a8a1aacffb4812cfb284c5527
This commit is contained in:
committed by
Facebook Github Bot
parent
68635184c2
commit
da25241f7f
@@ -1,5 +1,5 @@
|
||||
diff --git a/node_modules/adbkit/lib/adb/parser.js b/node_modules/adbkit/lib/adb/parser.js
|
||||
index 1b66bda..295c8f6 100644
|
||||
index 1b66bda..c41037d 100644
|
||||
--- a/node_modules/adbkit/lib/adb/parser.js
|
||||
+++ b/node_modules/adbkit/lib/adb/parser.js
|
||||
@@ -52,7 +52,7 @@ Parser = (function() {
|
||||
@@ -11,6 +11,24 @@ index 1b66bda..295c8f6 100644
|
||||
resolver = Promise.defer();
|
||||
tryRead = (function(_this) {
|
||||
return function() {
|
||||
@@ -108,7 +108,7 @@ Parser = (function() {
|
||||
return resolver.reject(new Parser.PrematureEOFError(howMany));
|
||||
}
|
||||
} else {
|
||||
- return resolver.resolve(new Buffer(0));
|
||||
+ return resolver.resolve(Buffer.alloc(0));
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
@@ -196,7 +196,7 @@ Parser = (function() {
|
||||
|
||||
Parser.prototype.readUntil = function(code) {
|
||||
var read, skipped;
|
||||
- skipped = new Buffer(0);
|
||||
+ skipped = Buffer.alloc(0);
|
||||
read = (function(_this) {
|
||||
return function() {
|
||||
return _this.readBytes(1).then(function(chunk) {
|
||||
diff --git a/node_modules/adbkit/lib/adb/protocol.js b/node_modules/adbkit/lib/adb/protocol.js
|
||||
index d1377d0..2edd7ba 100644
|
||||
--- a/node_modules/adbkit/lib/adb/protocol.js
|
||||
|
||||
Reference in New Issue
Block a user