Strictly check for boolean type.
This commit is contained in:
parent
94044b2950
commit
bfd5f5d221
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,8 @@ Handle<Value> Converter<bool>::ToV8(Isolate* isolate, bool val) {
|
|||
}
|
||||
|
||||
bool Converter<bool>::FromV8(Isolate* isolate, Handle<Value> val, bool* out) {
|
||||
if (!val->IsBoolean())
|
||||
return false;
|
||||
*out = val->BooleanValue();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue