No I haven't tried as of yet, since our games binary isn't well designed 
and compiling it as debug isn't easy to do as of yet.

But obviously there's a large diff in 

this

void ScriptManager::executeGlobalScript(const std::string &fileName)
{
std::string* fileData = readScriptFile(fileName);

if(fileData == nullptr)
return;

Locker lck(mGlobalIsolate);
Isolate::Scope isoScope(mGlobalIsolate);
HandleScope scope(mGlobalIsolate);

Handle<Context> ctx = Local<Context>::New(mGlobalIsolate, mGlobalContext);

ctx->Enter();

Handle<Object> global = ctx->Global();

Local<Script> script = Script::Compile(String::New(fileData->c_str()), 
String::New(fileName.c_str()));

TryCatch tCatch;
Local<Value> result = script->Run();

if(tCatch.HasCaught())
{
reportException(mGlobalIsolate, tCatch);
}

ctx->Exit();

delete fileData;
}

and 

this

Local<Value> executeFunction(Isolate* iso, const Persistent<Function>& fnc, 
Handle<Object> recv, int argc, Handle<Value> argv[])
{
Locker lck(iso);
Isolate::Scope isoScope(iso);
HandleScope scope(iso);

TryCatch tCatch;

Local<Value> retVal = Handle<Function>::New(iso, fnc)->Call(recv, argc, 
argv);

if(tCatch.HasCaught())
{
reportException(iso, tCatch);
return tCatch.Exception();
}

return retVal;
}


Those are the only two areas in which I call the TryCatch stuff, and for 
some reason the latter seems to entirely lack any useful information and 
causes a massive crash when you try to get any.

-- 
-- 
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