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 Myles Borins committed Mar 21, 2016
1 parent 6386f62 commit 242a65e
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 242a65e

Please sign in to comment.