The crash occurs inside the Bind() function where I try to fetch the global 
template. Meanwhile I update the class related to my other question. This 
way I got rid of the Setup() function. Below is the new Bind() function.

void Bind(string Name, function<v8::Handle<v8::Value>(v8::Arguments const 
&)> Function)
{
    v8::InvocationCallback* function = 
Function.target<v8::InvocationCallback>();
    v8::Local<v8::Object> global = context->Global();
    global->Set(v8::String::New(Name.c_str()), 
v8::FunctionTemplate::New(*function)->GetFunction());
 }

It crashes at context->Global(); because of access violation as before. I 
also tried to access the context using v8::Context::GetCurrent()->Global() 
but the result is the same.

On Monday, April 1, 2013 3:56:11 PM UTC+2, Stephan Beal wrote:
>
> The error is a null-pointer exception. Are you 100% certain that the above 
> calls return non-NULL?
>

I checked them and none of these pointers are null. But as mentioned above, 
I found the location where the access violation takes place. It a V8 
internal thing.

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to