[v8-users] Re: Persistent from Function Argument

Wed, 27 May 2009 17:00:41 -0700

Sounds like a bug.

On May 27, 6:12 am, "A. Mock" <[email protected]> wrote:
> I have a C++ function that gets called from JavaScript with two
> arguments that I need Persistent handles to.  I tried
>
> v8::Local<v8::Object> obj = args[0]->ToObject();
> v8::Local<v8::Function> updateFunc = v8::Local<v8::Function>::Cast(args
> [1]->ToObject());
> pUpdateFunc = v8::Persistent<v8::Function>::New(updateFunc);
> pObj = v8::Persistent<v8::Object>::New(obj);
>
> but as soon as I try to use those handles outside the function v8
> exits with an assertion failure in debug mode and a segfault in
> release mode.  Is there any way to get a usable Persistent handle from
> the function's arguments?
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to