From cb51688c36edd56506ae3a3cb24c163352ab7fcf Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Mon, 1 Feb 2016 18:17:48 -0600 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- lib/_stream_transform.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index d58f112acf..50fc542b5a 100644 --- a/lib/_stream_transform.js +++ b/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) {