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..b9297122da515d7a724e16f552845f9107ce51e6 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()) { |
+ s->AddString(std::string()); |
+ return; |
+ } |
+ |
+ s->AddString(p.possibly_invalid_spec()); |
dcheng
2016/05/11 17:39:12
Ditto: maybe this should just be GetParamSize(s, p
jam
2016/05/11 17:57:02
Done.
|
+} |
+ |
void ParamTraits<GURL>::Write(base::Pickle* m, const GURL& p) { |
if (p.possibly_invalid_spec().length() > url::kMaxURLChars) { |
m->WriteString(std::string()); |