Fix use of the default error text when returning RV_CONTINUE from HandleLoadError (issue #161).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@156 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
a99e32072e
commit
650cb1d41d
|
@ -696,16 +696,19 @@ void BrowserWebViewDelegate::didFailProvisionalLoad(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string error_text;
|
std::string error_text;
|
||||||
|
CefString errorStr;
|
||||||
|
|
||||||
CefRefPtr<CefHandler> handler = browser_->GetHandler();
|
CefRefPtr<CefHandler> handler = browser_->GetHandler();
|
||||||
|
CefHandler::RetVal rv = RV_CONTINUE;
|
||||||
if(handler.get()) {
|
if(handler.get()) {
|
||||||
// give the handler an opportunity to generate a custom error message
|
// give the handler an opportunity to generate a custom error message
|
||||||
CefString errorStr;
|
rv = handler->HandleLoadError(browser_,
|
||||||
CefHandler::RetVal rv = handler->HandleLoadError(browser_,
|
|
||||||
browser_->GetCefFrame(frame),
|
browser_->GetCefFrame(frame),
|
||||||
static_cast<CefHandler::ErrorCode>(error.reason),
|
static_cast<CefHandler::ErrorCode>(error.reason),
|
||||||
std::string(failed_ds->request().url().spec().data()), errorStr);
|
std::string(failed_ds->request().url().spec().data()), errorStr);
|
||||||
if(rv == RV_HANDLED && !errorStr.empty())
|
}
|
||||||
|
|
||||||
|
if(rv == RV_HANDLED && !errorStr.empty()) {
|
||||||
error_text = errorStr;
|
error_text = errorStr;
|
||||||
} else {
|
} else {
|
||||||
error_text = StringPrintf("Error %d when loading url %s",
|
error_text = StringPrintf("Error %d when loading url %s",
|
||||||
|
|
Loading…
Reference in New Issue