diff options
author | Rich Trott <rtrott@gmail.com> | 2016-02-08 16:32:13 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-02-10 09:50:00 -0800 |
commit | 25713861c074893a4a3855ec1aa63fe1725238c8 (patch) | |
tree | 7e09eb33127db0ce3846d3b95bff47a87ea673a4 /test/common.js | |
parent | 97813be8e689dfbf3da44e9604672fcdb304dd62 (diff) | |
download | node-new-25713861c074893a4a3855ec1aa63fe1725238c8.tar.gz |
test: remove unneeded common.indirectInstanceOf()
PR-URL: https://github.com/nodejs/node/pull/5149
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/common.js')
-rw-r--r-- | test/common.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/test/common.js b/test/common.js index 152e5e5c6f..b7c64d2852 100644 --- a/test/common.js +++ b/test/common.js @@ -188,19 +188,6 @@ exports.hasIPv6 = Object.keys(ifaces).some(function(name) { }); }); -function protoCtrChain(o) { - var result = []; - for (; o; o = Object.getPrototypeOf(o)) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - exports.ddCommand = function(filename, kilobytes) { if (exports.isWindows) { |