From 7e57687ae9b1cea4369d2b443f632d4d921407ae Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Fri, 5 Aug 2011 21:21:30 +0200 Subject: [PATCH 1/2] Fixes #268 , without reconenct branch now <3 --- lib/util.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util.js b/lib/util.js index 5a5d3bd44..6dac54973 100644 --- a/lib/util.js +++ b/lib/util.js @@ -252,6 +252,8 @@ util.inherit = function (ctor, ctor2) { function f() {}; f.prototype = ctor2.prototype; + + util.merge(ctor, ctor2); ctor.prototype = new f; }; From e0d3bdb4acbe993a058618e1339b8cee7acd93d3 Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Sun, 7 Aug 2011 21:27:11 +0200 Subject: [PATCH 2/2] We decided to follow the inherit of node. So we only merge it for transport that need it --- lib/transports/xhr-polling.js | 6 ++++++ lib/util.js | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/transports/xhr-polling.js b/lib/transports/xhr-polling.js index 289febeba..1d05fe117 100644 --- a/lib/transports/xhr-polling.js +++ b/lib/transports/xhr-polling.js @@ -31,6 +31,12 @@ io.util.inherit(XHRPolling, io.Transport.XHR); + /** + * Merge the properties from XHR transport + */ + + io.util.merge(XHRPolling, io.Transport.XHR); + /** * Transport name * diff --git a/lib/util.js b/lib/util.js index 6dac54973..5a5d3bd44 100644 --- a/lib/util.js +++ b/lib/util.js @@ -252,8 +252,6 @@ util.inherit = function (ctor, ctor2) { function f() {}; f.prototype = ctor2.prototype; - - util.merge(ctor, ctor2); ctor.prototype = new f; };