From: Vladimir Kurchatkin Date: Fri, 9 Jan 2015 11:51:39 +0000 (+0300) Subject: _debug_agent: use `readableObjectMode` option X-Git-Tag: v1.0.2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e62ae4304a0bee3aec8c5fb743eb17d78b1cd35;p=platform%2Fupstream%2Fnodejs.git _debug_agent: use `readableObjectMode` option Use public `readableObjectMode` option to construct `Transform` instead of accessing private `_readableState.objectMode`. Partially addresses https://github.com/iojs/io.js/issues/445. PR-URL: https://github.com/iojs/io.js/pull/270 Reviewed-By: Fedor Indutny Reviewed-By: Ben Noordhuis Reviewed-By: Bert Belder Reviewed-By: Chris Dickinson --- diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index d0e6dff..221b672 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -83,8 +83,9 @@ Agent.prototype.notifyWait = function notifyWait() { }; function Client(agent, socket) { - Transform.call(this); - this._readableState.objectMode = true; + Transform.call(this, { + readableObjectMode: true + }); this.agent = agent; this.binding = this.agent.binding;