| Index: chrome/browser/ui/webui/html_dialog_ui.cc
|
| diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
|
| index fd3341a4bbe187646a511a3a239a7d6a266e4bbf..9f01d1582ec1cc008bf7af2dac8e0ce505222a2d 100644
|
| --- a/chrome/browser/ui/webui/html_dialog_ui.cc
|
| +++ b/chrome/browser/ui/webui/html_dialog_ui.cc
|
| @@ -29,6 +29,10 @@ HtmlDialogUI::~HtmlDialogUI() {
|
| // and the HTML dialogs won't swap WebUIs anyway since they don't navigate.
|
| }
|
|
|
| +void HtmlDialogUI::CloseDialog(const base::ListValue* args) {
|
| + OnDialogClosed(args);
|
| +}
|
| +
|
| // static
|
| PropertyAccessor<HtmlDialogUIDelegate*>& HtmlDialogUI::GetPropertyAccessor() {
|
| return g_html_dialog_ui_property_accessor.Get();
|
| @@ -67,8 +71,8 @@ void HtmlDialogUI::OnDialogClosed(const ListValue* args) {
|
| tab_contents()->property_bag());
|
| if (delegate) {
|
| std::string json_retval;
|
| - if (!args->GetString(0, &json_retval))
|
| - NOTREACHED() << "Could not read JSON arguments";
|
| + if (args && !args->empty() && !args->GetString(0, &json_retval))
|
| + NOTREACHED() << "Could not read JSON argument";
|
|
|
| (*delegate)->OnDialogClosed(json_retval);
|
| }
|
|
|