On Fri, Nov 19, 2010 at 09:30, ondras <[email protected]> wrote:
> I need to check (in C++) whether a given v8::Object is an instance of
> a given v8::Function. The problem is that I don't have the adequate
> v8::FunctionTemplate (to call HasInstance) and there is no way to get
> from Function to its Template...

Something like this?

  bool isInstanceOf = function->Equals(Function::Cast(*object)->GetPrototype());

You might need to walk the whole prototype chain.

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to