On Tue, Oct 15, 2013 at 8:56 AM, ashish negi <
thisismy...@gmail.com> wrote:
> In the c++ function class i see the function call definition as :
>
> class Function : public Object {
> public:
> // ........
> V8EXPORT Local<Value> Call(Handle<Object> recv,
> int argc,
> Handle<Value> argv[]);
> // ......
> };
>
> What is the recv for in this ?
The receiver is the `this` object to execute the function with.
`fn->Call(obj, argc, argv)` is the C++ equivalent of `fn.apply(obj,
argv)`.
> From the c++, i am calling a function. i have a persistent handle of the
> function as
>
> Persistent<Value> func;
> v8::Local<v8::Value> funcRetVal =
> func.As<v8::Function>()->Call(v8::Context::GetCurrent()->Global(),
> argv.size(), argv.data());
>
> But this is not working.
What is not working? What error do you get?