mirror of https://github.com/lukechilds/node.git
Browse Source
If JS throws an object whose toString() method throws, then Node attempts to print an empty message, but actually prints garbage. This commit checks for this case, and prints a message instead. Fixes: https://github.com/nodejs/node/issues/4079 PR-URL: https://github.com/nodejs/node/pull/4112 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>v5.x
committed by
Rod Vagg
3 changed files with 15 additions and 5 deletions
@ -0,0 +1,5 @@ |
|||
throw { |
|||
toString: function() { |
|||
throw this; |
|||
} |
|||
}; |
Loading…
Reference in new issue