Status: New
Owner: ----
New issue 1862 by [email protected]: Context::New crash when called with
template with own function on Win7 x64
http://code.google.com/p/v8/issues/detail?id=1862
I am trying to use 64 bit V8 from 64 bit Delphi application. I have created
a simple library with only one exported function:
__declspec(dllexport) void __stdcall init(void) {
HandleScope handle_scope;
Handle<ObjectTemplate> pTemplate = ObjectTemplate::New();;
pTemplate->Set(String::New("Test"), FunctionTemplate::New(Test));
Persistent<Context> context = Context::New(0,pTemplate);
Context::Scope context_scope(context);
Handle<String> source = String::New("'test'");
Handle<Script> script = Script::Compile(source);
Handle<Value> result = script->Run();
context.Dispose();
String::AsciiValue ascii(result);
printf("%s\n", *ascii);
return 0;
}
I have simple Delphi application that loads this library and calls function
init. Everything was working before I added function Test to the template.
Since I added function Test to the template, it crashes when creating
Context::New. I am using V8 version 3.7.12.8 built with VS2010.
Code of my function Test:
Handle<Value> Test(const Arguments& args){
printf("a");
return Undefined();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev