Merge branch 'webcontent_invalid_loadurl_patch' of https://github.com/deepak1556/atom-shell into deepak1556-webcontent_invalid_loadurl_patch

This commit is contained in:
Cheng Zhao 2016-02-15 21:14:54 +08:00
commit 08e5c1f6fe
3 changed files with 29 additions and 2 deletions

View file

@ -710,6 +710,14 @@ bool WebContents::Equal(const WebContents* web_contents) const {
}
void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) {
if (!url.is_valid()) {
Emit("did-fail-load",
static_cast<int>(net::ERR_INVALID_URL),
net::ErrorToShortString(net::ERR_INVALID_URL),
url.possibly_invalid_spec());
return;
}
content::NavigationController::LoadURLParams params(url);
GURL http_referrer;