mirror of https://github.com/lukechilds/node.git
Browse Source
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>v2.0.2
Roman Klauke
10 years ago
committed by
Ben Noordhuis
3 changed files with 14 additions and 1 deletions
@ -0,0 +1,6 @@ |
|||
var common = require('../common'); |
|||
var assert = require('assert'); |
|||
var v8 = require('v8'); |
|||
|
|||
assert.throws(function() {v8.setFlagsFromString(1)}, TypeError); |
|||
assert.throws(function() {v8.setFlagsFromString()}, TypeError); |
Loading…
Reference in new issue