Skip to content

Commit d63ac28

Browse files
Ayase-252danielleadams
authored andcommittedFeb 16, 2021
http: explain the unused argument in IncomingMessage._read
PR-URL: #37275 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 061939d commit d63ac28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎lib/_http_incoming.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
152152
return this;
153153
};
154154

155-
155+
// Argument n cannot be factored out due to the overhead of
156+
// argument adaptor frame creation inside V8 in case that number of actual
157+
// arguments is different from expected arguments.
158+
// Ref: https://bugs.chromium.org/p/v8/issues/detail?id=10201
156159
IncomingMessage.prototype._read = function _read(n) {
157160
if (!this._consuming) {
158161
this._readableState.readingMore = false;

0 commit comments

Comments
 (0)
Please sign in to comment.