Add handling for empty V8 exception messages (issue #342).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@331 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
2085cc9ce2
commit
5022adb6ad
|
@ -1030,10 +1030,15 @@ bool CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||||
|
|
||||||
v8::TryCatch try_catch;
|
v8::TryCatch try_catch;
|
||||||
v8::Local<v8::Value> func_rv = func->Call(recv, argc, argv);
|
v8::Local<v8::Value> func_rv = func->Call(recv, argc, argv);
|
||||||
if (try_catch.HasCaught())
|
if (try_catch.HasCaught()) {
|
||||||
GetCefString(try_catch.Message()->Get(), exception);
|
v8::Local<v8::Message> msg = try_catch.Message();
|
||||||
else
|
if (msg.IsEmpty())
|
||||||
|
exception = "CEF received an empty exception message.";
|
||||||
|
else
|
||||||
|
GetCefString(msg->Get(), exception);
|
||||||
|
} else {
|
||||||
retval = new CefV8ValueImpl(func_rv);
|
retval = new CefV8ValueImpl(func_rv);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue