Skip to content

Commit 926bb4f

Browse files
Ayase-252targos
authored andcommitted
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 8c41bc9 commit 926bb4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/_http_incoming.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ IncomingMessage.prototype.setTimeout = function setTimeout(msecs, callback) {
100100
return this;
101101
};
102102

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

0 commit comments

Comments
 (0)