Skip to content

Commit

Permalink
stream: prevent object map change in TransformState
Browse files Browse the repository at this point in the history
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: nodejs#5032
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
evanlucas committed Feb 2, 2016
1 parent b0b4aeb commit cb51688
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/_stream_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function TransformState(stream) {
this.transforming = false;
this.writecb = null;
this.writechunk = null;
this.writeencoding = null;
}

function afterTransform(stream, er, data) {
Expand Down

0 comments on commit cb51688

Please sign in to comment.