result->GetException()
If I comment it out, the app runs normally.
- Code: Select all
void GCefV8Handler::sendToBrowserImpl(const std::string& message, const std::string & extraContent)
{
GalaxyAssert(CefCurrentlyOn(TID_RENDERER), "Not on renderer thread.");
if (m_callbackContext == NULL)
return;
m_callbackContext->Enter();
CefV8ValueList args;
args.push_back(CefV8Value::CreateString(message));
args.push_back(CefV8Value::CreateString(extraContent));
CefRefPtr<CefV8Value> result = m_callbackFunc->ExecuteFunctionWithContext(m_callbackContext, m_object, args);
CefRefPtr<CefV8Exception> exception = result->GetException();
if (result == NULL)
{
if (m_callbackFunc->GetException() != NULL)
{
CefRefPtr<CefV8Exception> exception = m_callbackFunc->GetException();
std::string error = exception->GetMessage();
GalaxyClient::Logger::LogWarning("Send to browser failed with exception %s at line %d; message: %s", error.c_str(), exception->GetLineNumber(), message.c_str());
}
else
GalaxyClient::Logger::LogWarning("Send to browser failed with NULL exception; message: %s", message.c_str());
}
else if (result->GetException() != NULL)
{
CefRefPtr<CefV8Exception> exception = result->GetException();
std::string error = exception->GetMessage();
GalaxyClient::Logger::LogWarning("Send to browser failed with exception %s at line %d; message: %s", error.c_str(), exception->GetLineNumber(), message.c_str());
}
m_callbackContext->Exit();
}
[0930/141109:FATAL:v8_impl.cc(1583)] Check failed: false. V8 handle is not valid
0 Chromium Embedded Framework 0x00000001021681cf base::debug::StackTrace::StackTrace() + 47
1 Chromium Embedded Framework 0x0000000102168223 base::debug::StackTrace::StackTrace() + 35
2 Chromium Embedded Framework 0x00000001021ea0e6 logging::LogMessage::~LogMessage() + 70
3 Chromium Embedded Framework 0x00000001021e9113 logging::LogMessage::~LogMessage() + 35
4 Chromium Embedded Framework 0x00000001020bbfe0 CefV8ValueImpl::GetException() + 592
5 Chromium Embedded Framework 0x0000000101edff5b v8value_get_exception(_cef_v8value_t*) + 283
6 GalaxyClient 0x0000000100d7d279 CefV8ValueCToCpp::GetException() + 153
7 GalaxyClient 0x0000000100103563 GalaxyClient::GCefV8Handler::sendToBrowserImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 1731