mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -1030,10 +1030,15 @@ bool CefV8ValueImpl::ExecuteFunctionWithContext(
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
v8::Local<v8::Value> func_rv = func->Call(recv, argc, argv);
|
||||
if (try_catch.HasCaught())
|
||||
GetCefString(try_catch.Message()->Get(), exception);
|
||||
else
|
||||
if (try_catch.HasCaught()) {
|
||||
v8::Local<v8::Message> msg = try_catch.Message();
|
||||
if (msg.IsEmpty())
|
||||
exception = "CEF received an empty exception message.";
|
||||
else
|
||||
GetCefString(msg->Get(), exception);
|
||||
} else {
|
||||
retval = new CefV8ValueImpl(func_rv);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user