These are the functions to create new primitives in the V8 C++ API:
Handle<Boolean> v8::Boolean::New(bool value)
Local<Number> v8::Number::New(double value)
Local<String> v8::String::New(const char *data, int length=-1)
I wonder why Boolean
returns a Handle
while the others return a Local
.
My assumption is that it's related to booleans having only two possibly values but unfortunately the docs are really poor and do not mention things like that.