| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true.
`state.corkedRequestsFree` of a writable stream is always not null.
There was a problem hiding this comment.
Thanks for contributing! I've left some questions/notes around the PR.
Sorry, something went wrong.
| } | ||
|
|
||
| // reuse the free corkReq. | ||
| state.corkedRequestsFree.next = corkReq; |
There was a problem hiding this comment.
Unfortunately, this can end up being null because it copied over in: https://github.com/MoonBall/node/blob/dd13a79b830ef2d33ac0288e197a431a63e40941/lib/_stream_writable.js#L517. Can you revert this?
Sorry, something went wrong.
There was a problem hiding this comment.
if (holder.next) can ensure that state.corkedRequestsFree is not null.
Sorry, something went wrong.
Sorry, something went wrong.
|
|
||
| // ignore unnecessary end() calls. | ||
| if (!state.ending && !state.finished) | ||
| if (!state.ending) |
There was a problem hiding this comment.
This is actually a behavior change. Can you add a unit test?
Sorry, something went wrong.
There was a problem hiding this comment.
state.finished = true is only in finishMaybe(). If we simplify the finishMaybe(), it should be:
function finishMaybe(stream, state) {
if (state.ending) {
state.finished = true;
}
}
And, state.ending doesn't set to false.
So:
Sorry, something went wrong.
|
|
||
| if (!state.writing && | ||
| !state.corked && | ||
| !state.finished && |
There was a problem hiding this comment.
why is this unused?
Sorry, something went wrong.
There was a problem hiding this comment.
state.finished should equal false if state.bufferedRequest isn't null.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
Should this land on LTS? It lands cleanly on 8.x, but will require a backport for 6.x |
Sorry, something went wrong.
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: nodejs#18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: nodejs#18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
I've landed on 8.x @nodejs/streams @mcollina please lmk if it should be backed out |
Sorry, something went wrong.
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
This can be backported. |
Sorry, something went wrong.
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
In `Writable.prototype.end()`, `state.ending` is true after calling `endWritable()` and it doesn't reset to false. In `Writable.prototype.uncork()`, `state.finished` must be false if `state.bufferedRequest` is true. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`state.corkedRequestsFree` of a writable stream is always not null. PR-URL: #18145 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
| Back | FazBrowse Home | New Git URL |
In Writable.prototype.end(), state.ending is true after calling
endWritable() and it doesn't reset to false.
In Writable.prototype.uncork(), state.finished must be false
if state.bufferedRequest is true.
In onCorkedFinish(), state.corkedRequestsFree of a writable
stream is never null.
Checklist
Affected core subsystem(s)
stream