Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: chrome/browser/ui/webui/net_internals_ui.cc

Issue 8084015: Fix a crash when loading about:net-internals#spdy and the next_protos() is NULL (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: reword comment Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/net_internals_ui.cc
===================================================================
--- chrome/browser/ui/webui/net_internals_ui.cc (revision 102354)
+++ chrome/browser/ui/webui/net_internals_ui.cc (working copy)
@@ -1191,10 +1191,14 @@
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698