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 <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
evanlucas authored and Michael Scovetta committed Apr 2, 2016
1 parent 8dc1ce4 commit 5a7a880
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 5a7a880

Please sign in to comment.