Log a warning if we try to load a URL longer than kMaxURLChars.
Review URL: https://chromiumcodereview.appspot.com/23983010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222094 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6a776e5..1856a8d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1774,8 +1774,11 @@
// 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));