Ok, I got it! It was worth the chase, because it's important. There really should be more documentation, so we don't get these gotchas spending hours on debugging. When I was assigning to a persistent handle, I just used the assignment operator '='. Seems this does not make the handle persistent. When I replaced this with myPersistent = Persistent<ObjectTemplate>::New(localHandle) things worked.
Alex On Sep 22, 7:06 pm, avasilev <[email protected]> wrote: > Well, I got an assertion when instantiating the object that something > is not a JsObject. Seems there is something wrong with the template. > Alex > > On Sep 22, 6:03 pm, Stephan Beal <[email protected]> wrote: > > > > > > > > > On Thu, Sep 22, 2011 at 4:42 PM, avasilev <[email protected]> wrote: > > > However, when the constructor callback returns, the app crashes with > > > access violation. It seems I am doing it wrong, but what exactly? > > > Can you try this with a debug build of v8? In debug mode violating a v8 > > assertion will dump lots of useful info (well, normally) to stderr. > > Oftentimes the solution to such problems is described (or implied) in the > > message. > > > -- > > ----- stephan bealhttp://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
