Index: url/ipc/url_param_traits.cc |
diff --git a/url/ipc/url_param_traits.cc b/url/ipc/url_param_traits.cc |
index e40ae8f9a3c9ccc4558cf6fb559f0342ebec545d..b41e4716204f9a383e5cb64980fdbf86a2633a9e 100644 |
--- a/url/ipc/url_param_traits.cc |
+++ b/url/ipc/url_param_traits.cc |
@@ -8,6 +8,15 @@ |
namespace IPC { |
+void ParamTraits<GURL>::GetSize(base::PickleSizer* s, const GURL& p) { |
+ if (p.possibly_invalid_spec().length() > url::kMaxURLChars || !p.is_valid()) { |
+ GetParamSize(s, std::string()); |
+ return; |
+ } |
+ |
+ GetParamSize(s, p.possibly_invalid_spec()); |
+} |
+ |
void ParamTraits<GURL>::Write(base::Pickle* m, const GURL& p) { |
if (p.possibly_invalid_spec().length() > url::kMaxURLChars) { |
m->WriteString(std::string()); |