Is there something inherently wrong with the following:

int main(int argc, char* argv[])
{
   V8::SetFlagsFromCommandLine(&argc, argv, true);
   HandleScope handle_scope;

   Handle<ObjectTemplate> tmpl;
   Handle<ObjectTemplate> raw_template = ObjectTemplate::New();
   tmpl = Persistent<ObjectTemplate>::New(raw_template);
   Handle<Object> result = Persistent<Object>::New(tmpl->NewInstance
());
...
}

Segmentation fault occurs on the last line of code there.  I notice
that if I create a Context and Scope beforehand then it does not
crash.  What I don't understand is why the stack-allocated handle
scope is not enough or am I doing something else wrong maybe related
to Persistent handles?
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to