You can explicitly return null through v8::Null :
return scope.Close( Null() );
It also turns out that if a Value variable is declared, it is automatically assigned undefined . For example, the following returns undefined to JavaScript:
HandleScope scope; Local<Value> result; ... return scope.Close(result);
source share