summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-06-14 10:16:35 -0700
committerRussell Brenner <russellbrenner@google.com>2011-06-14 12:59:58 -0700
commit7c9f4088c168b2d83397a224c05dd7be87720317 (patch)
treea3f7cd050b3aa70172cdc661ce0d3b8ea6b5a1da /net/spdy
parentfc1e79c2b539be25f76e40f653d1fcfdf4f6e522 (diff)
downloadexternal_chromium-7c9f4088c168b2d83397a224c05dd7be87720317.zip
external_chromium-7c9f4088c168b2d83397a224c05dd7be87720317.tar.gz
external_chromium-7c9f4088c168b2d83397a224c05dd7be87720317.tar.bz2
Add a null pointer check in ApplyCwndFieldTrial
Find("SpdyCwnd") is sometimes coming back null. This guards against that case. http://codereview.chromium.org/6877124/ Change-Id: Ic6da3c39049397b7e430797a43ab0df30df277d2
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_session.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index cbc1365..52ba94a 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1329,6 +1329,10 @@ void SpdySession::SendWindowUpdate(spdy::SpdyStreamId stream_id,
// field trial policy.
uint32 ApplyCwndFieldTrialPolicy(int cwnd) {
base::FieldTrial* trial = base::FieldTrialList::Find("SpdyCwnd");
+ if (!trial) {
+ LOG(WARNING) << "Could not find \"SpdyCwnd\" in FieldTrialList";
+ return cwnd;
+ }
if (trial->group_name() == "cwnd32")
return 32;
else if (trial->group_name() == "cwnd16")