Skip to content

Commit ee8d4bb

Browse files
evanlucasrvagg
authored andcommitted
stream: prevent object map change in TransformState
TransformState has the writeencoding property that gets set on the first _write. It is not declared when the transform state is initially constructed and can cause a deopt. PR-URL: #5032 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8c7f4ba commit ee8d4bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/_stream_transform.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ function TransformState(stream) {
5858
this.transforming = false;
5959
this.writecb = null;
6060
this.writechunk = null;
61+
this.writeencoding = null;
6162
}
6263

6364
function afterTransform(stream, er, data) {

0 commit comments

Comments
 (0)