src: add type check to v8.setFlagsFromString()
authorRoman Klauke <romaaan.git@gmail.com>
Thu, 7 May 2015 18:27:12 +0000 (20:27 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 8 May 2015 17:09:45 +0000 (19:09 +0200)
commit931a0d463443c68a10c8028f2ebdd01db20da1f9
tree5babba4596ef3e30d1cbebd3462ebdd5682f6c5a
parent8bf878d6e5ac0faa3871cddd5dcc423ae4d3d45a
src: add type check to v8.setFlagsFromString()

Calling v8.setFlagsFromString with e.g a function as a flag argument
gave no exception or warning that the function call will fail.

There is now an exception if the function gets called with the wrong
flag type (string is required) or that a flag is expected.

Other APIs already provide exceptions if the argument has not the
expected type.

PR-URL: https://github.com/iojs/io.js/pull/1652
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
doc/api/v8.markdown
src/node_v8.cc
test/parallel/test-v8-flag-type-check.js [new file with mode: 0644]