contextify: use CHECK instead of `if`
authorOguz Bastemur <obastemur@gmail.com>
Wed, 30 Sep 2015 05:02:12 +0000 (07:02 +0200)
committerRod Vagg <rod@vagg.org>
Fri, 2 Oct 2015 03:39:26 +0000 (13:39 +1000)
commite5615854ea81a18e3aca7b03b52b9f6d73657d84
treef4bf6dc2cc4b8a21ae82e425b548c3683d893e8c
parent4c5940776c1ae64268429cfb111bac8374296a02
contextify: use CHECK instead of `if`

I was walking through the vm changes and saw this particular `if` check
interesting. In case `ctx` is empty it's going to fail later anyways.
So, instead of putting an `if` check there;

option a - use CHECK
option b - do nothing

Considering the developer wanted to make sure `ctx` is not empty,
`CHECK` option looked more convenient.

PR-URL: https://github.com/nodejs/node/pull/3125
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
src/node_contextify.cc