mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-01 10:27:44 +01: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:
parent
2085cc9ce2
commit
5022adb6ad
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user