summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-09 21:10:54 +0000
committerrhashimoto@chromium.org <rhashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-09 21:10:54 +0000
commit6c820db2addea907bdeadd51d38068de28a03fc7 (patch)
treee91ecd2f9d95b162c90972abed95bbd620bb0b34
parent40c4627d7584c58fb5a8b3b258892a22bd29070f (diff)
downloadchromium_src-6c820db2addea907bdeadd51d38068de28a03fc7.zip
chromium_src-6c820db2addea907bdeadd51d38068de28a03fc7.tar.gz
chromium_src-6c820db2addea907bdeadd51d38068de28a03fc7.tar.bz2
Allow no arguments in ConstrainedHtmlUI::OnDialogClose().
This fixes a NOTREACHED in ConstrainedHtmlUI::OnDialogClose() when the auth dialog is cancelled. BUG=none TEST=ChromeOS debug build should not trace stack and break on clicking HTTP auth cancel button. Review URL: http://codereview.chromium.org/7757006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100497 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/constrained_html_ui.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc
index caf05bc..220fdfe 100644
--- a/chrome/browser/ui/webui/constrained_html_ui.cc
+++ b/chrome/browser/ui/webui/constrained_html_ui.cc
@@ -49,7 +49,7 @@ void ConstrainedHtmlUI::OnDialogCloseMessage(const ListValue* args) {
return;
std::string json_retval;
- if (!args->GetString(0, &json_retval))
+ if (!args->empty() && !args->GetString(0, &json_retval))
NOTREACHED() << "Could not read JSON argument";
delegate->GetHtmlDialogUIDelegate()->OnDialogClosed(json_retval);
delegate->OnDialogCloseFromWebUI();