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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 23983010: Log a warning if we try to load a URL longer than kMaxURLChars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 471e056e8f341b1a20c801211639f604480d67a0..96349e0978dca35c32764d58c425145903d7f5eb 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1763,8 +1763,11 @@ bool WebContentsImpl::NavigateToEntry(
// The renderer will reject IPC messages with URLs longer than
// this limit, so don't attempt to navigate with a longer URL.
- if (entry.GetURL().spec().size() > kMaxURLChars)
+ if (entry.GetURL().spec().size() > kMaxURLChars) {
+ LOG(WARNING) << "Refusing to load URL as it exceeds " << kMaxURLChars
+ << " characters.";
return false;
+ }
RenderViewHostImpl* dest_render_view_host =
static_cast<RenderViewHostImpl*>(render_manager_.Navigate(entry));
« 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