Skip to content

Commit

Permalink
http: explain the unused argument in IncomingMessage._read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ayase-252 authored and danielleadams committed Feb 16, 2021
1 parent 061939d commit d63ac28
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/_http_incoming.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
return this;
};


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

0 comments on commit d63ac28

Please sign in to comment.