Ignore navigation to invalid URLs (issue #104).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@94 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2010-08-09 20:04:13 +00:00
parent e5e560c64a
commit af70b21705
1 changed files with 4 additions and 1 deletions

View File

@ -560,8 +560,11 @@ WebNavigationPolicy BrowserWebViewDelegate::decidePolicyForNavigation(
if(handler.get()) {
// Gather browse request information
CefRefPtr<CefRequest> req(CefRequest::CreateRequest());
GURL request_url = request.url();
if (!request_url.is_valid())
return WebKit::WebNavigationPolicyIgnore;
req->SetURL(UTF8ToWide(request_url.spec()));
req->SetMethod(
UTF8ToWide(webkit_glue::WebStringToStdString(request.httpMethod())));