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

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

Issue 7757006: Allow no arguments in ConstrainedHtmlUI::OnDialogClose() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle no arguments in ConstrainedHtmlUI::OnDialogCloseMessage(). 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/constrained_html_ui.cc
diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc
index caf05bc39214c3c208300529f69441d3ca218aac..220fdfe5250374426815de456c6d9992b784a18d 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();
« 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