summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 02:35:33 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-30 02:35:33 +0000
commit93df218b2749bb419d71faea53530400efbe963b (patch)
tree066caaf72c4aa68599729c5828aa135aab278788 /chrome/browser/ui
parent151b3e6573e2475b3f5b5db34e21e8b3be631192 (diff)
downloadchromium_src-93df218b2749bb419d71faea53530400efbe963b.zip
chromium_src-93df218b2749bb419d71faea53530400efbe963b.tar.gz
chromium_src-93df218b2749bb419d71faea53530400efbe963b.tar.bz2
Fix a crash when loading about:net-internals#spdy and the next_protos() is NULL
BUG=83866 Review URL: http://codereview.chromium.org/8084015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/webui/net_internals_ui.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/ui/webui/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals_ui.cc
index 9022d70..a227ec9 100644
--- a/chrome/browser/ui/webui/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals_ui.cc
@@ -1189,9 +1189,13 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetSpdyStatus(
status_dict->Set("force_spdy_always",
Value::CreateBooleanValue(
net::HttpStreamFactory::force_spdy_always()));
- status_dict->Set("next_protos",
- Value::CreateStringValue(
- *net::HttpStreamFactory::next_protos()));
+
+ // The next_protos may not be specified for certain configurations of SPDY.
+ Value* next_protos_value = net::HttpStreamFactory::next_protos() ?
+ Value::CreateStringValue(*net::HttpStreamFactory::next_protos()) :
+ Value::CreateStringValue("");
+
+ status_dict->Set("next_protos", next_protos_value);
SendJavascriptCommand(L"receivedSpdyStatus", status_dict);
}