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: #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 rvagg committed Feb 8, 2016
1 parent 8c7f4ba commit ee8d4bb
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 ee8d4bb

Please sign in to comment.