Here's my code:
v8::Local<v8::Script> load_script(const std::string& fname)
{
 std::string body;


 v8::Locker locker(isolate);
 v8::Isolate::Scope isolate_scope(isolate);
 v8::Local<v8::Context> context = v8::Local<v8::Context>::New(isolate, 
engine_context);
 v8::Context::Scope context_scope(context);
 v8::EscapableHandleScope handle_scope_escape(isolate);


 v8::TryCatch try_catch;
 std::ifstream f(fname);


 if (f)
 {
 std::ostringstream contents;
 contents << f.rdbuf();
 f.close();


 // Create a string containing the JavaScript source code.
 v8::Local<v8::String> source = v8::String::NewFromUtf8(isolate, contents.
str().c_str());


 // Compile the source code.
 auto origin = v8::ScriptOrigin(v8::String::NewFromUtf8(isolate, fname.c_str
()));
 v8::Local<v8::Script> script = v8::Script::Compile(source, &origin);


 if (script.IsEmpty())
 {
 // Print errors that happened during compilation.
 report_exception(try_catch, fname);
 }


 return handle_scope_escape.Escape(script);
 }
 else
 {
 throw std::exception();
 }


 context->Enter();


 return handle_scope_escape.Escape(v8::Script::Compile(v8::String::
NewFromUtf8(isolate, "")));
}

On calling  return handle_scope_escape.Escape(script); I got abort() 
because the check
DCHECK(isolate_->try_catch_handler() == NULL); 
in ThreadManager::FreeThreadResources
fails for some reason.
On Unix the same code works well
What could be the reason?
thanks

-- 
-- 
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/d/optout.

Reply via email to