diff options
author | Qingyu Deng <bitdqy@hotmail.com> | 2021-02-09 01:28:42 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2021-05-01 13:25:07 +0300 |
commit | 926bb4fd170ce0031f2f77d5fac8189676ccaf4a (patch) | |
tree | a189dae8574ab75c3e0ab7c7a7ed41a75745e5f1 /lib | |
parent | 8c41bc953eec14ae4ce309bb20f87bd4ebe2dffa (diff) |
http: explain the unused argument in IncomingMessage._read
PR-URL: https://github.com/nodejs/node/pull/37275
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_http_incoming.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index a33d75c3e79..7bf66fbddb8 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -100,7 +100,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; |