Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2627)

Unified Diff: content/shell/browser/shell_gtk.cc

Issue 25841002: Don't crash on invalid URL in GTK ContentShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: url was already a GURL Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_gtk.cc
diff --git a/content/shell/browser/shell_gtk.cc b/content/shell/browser/shell_gtk.cc
index a06a6a036f809049ec5b3b45042d91269f008ae4..3cc71f716683492552c49ddd843d4ed2550d2ca9 100644
--- a/content/shell/browser/shell_gtk.cc
+++ b/content/shell/browser/shell_gtk.cc
@@ -281,7 +281,8 @@ void Shell::OnURLEntryActivate(GtkWidget* entry) {
GURL url(str);
if (!url.has_scheme())
url = GURL(std::string("http://") + std::string(str));
- LoadURL(GURL(url));
+ if (url.is_valid())
+ LoadURL(url);
}
// Callback for when the main window is destroyed.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698