Browse Source

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: https://github.com/nodejs/node/pull/5032
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
Evan Lucas 9 years ago
parent
commit
cb51688c36
  1. 1
      lib/_stream_transform.js

1
lib/_stream_transform.js

@ -58,6 +58,7 @@ function TransformState(stream) {
this.transforming = false;
this.writecb = null;
this.writechunk = null;
this.writeencoding = null;
}
function afterTransform(stream, er, data) {

Loading…
Cancel
Save