summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/extension_bookmarks_module.cc7
-rw-r--r--chrome/browser/extensions/extensions_ui.cc5
-rw-r--r--chrome/browser/ui/gtk/certificate_dialogs.cc5
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc7
-rw-r--r--chrome/browser/ui/webui/options/extension_settings_handler.cc5
6 files changed, 31 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_bookmarks_module.cc b/chrome/browser/extensions/extension_bookmarks_module.cc
index 38b7422d..eea4ff1 100644
--- a/chrome/browser/extensions/extension_bookmarks_module.cc
+++ b/chrome/browser/extensions/extension_bookmarks_module.cc
@@ -800,7 +800,12 @@ void CreateBookmarkFunction::GetQuotaLimitHeuristics(
BookmarksIOFunction::BookmarksIOFunction() {}
-BookmarksIOFunction::~BookmarksIOFunction() {}
+BookmarksIOFunction::~BookmarksIOFunction() {
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (select_file_dialog_.get())
+ select_file_dialog_->ListenerDestroyed();
+}
void BookmarksIOFunction::SelectFile(SelectFileDialog::Type type) {
// Balanced in one of the three callbacks of SelectFileDialog:
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index 8bdbdc4..429f715 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -849,6 +849,11 @@ void ExtensionsDOMHandler::GetActivePagesForExtensionProcess(
}
ExtensionsDOMHandler::~ExtensionsDOMHandler() {
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (load_extension_dialog_.get())
+ load_extension_dialog_->ListenerDestroyed();
+
if (pack_job_.get())
pack_job_->ClearClient();
diff --git a/chrome/browser/ui/gtk/certificate_dialogs.cc b/chrome/browser/ui/gtk/certificate_dialogs.cc
index d3151c7..7866b287 100644
--- a/chrome/browser/ui/gtk/certificate_dialogs.cc
+++ b/chrome/browser/ui/gtk/certificate_dialogs.cc
@@ -107,6 +107,11 @@ Exporter::Exporter(gfx::NativeWindow parent,
}
Exporter::~Exporter() {
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (select_file_dialog_.get())
+ select_file_dialog_->ListenerDestroyed();
+
x509_certificate_model::DestroyCertChain(&cert_chain_list_);
}
diff --git a/chrome/browser/ui/webui/options/advanced_options_handler.cc b/chrome/browser/ui/webui/options/advanced_options_handler.cc
index ae43ced..a3a1779 100644
--- a/chrome/browser/ui/webui/options/advanced_options_handler.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_handler.cc
@@ -59,6 +59,10 @@ AdvancedOptionsHandler::AdvancedOptionsHandler() {
}
AdvancedOptionsHandler::~AdvancedOptionsHandler() {
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (select_folder_dialog_.get())
+ select_folder_dialog_->ListenerDestroyed();
}
void AdvancedOptionsHandler::GetLocalizedValues(
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 67397a2..6dc2b4b 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -681,8 +681,13 @@ void CertificateManagerHandler::ImportExportCleanup() {
password_.clear();
file_data_.clear();
selected_cert_list_.clear();
- select_file_dialog_ = NULL;
module_ = NULL;
+
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (select_file_dialog_.get())
+ select_file_dialog_->ListenerDestroyed();
+ select_file_dialog_ = NULL;
}
void CertificateManagerHandler::ImportServer(const ListValue* args) {
diff --git a/chrome/browser/ui/webui/options/extension_settings_handler.cc b/chrome/browser/ui/webui/options/extension_settings_handler.cc
index 9c1557b..b575d97 100644
--- a/chrome/browser/ui/webui/options/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/extension_settings_handler.cc
@@ -957,6 +957,11 @@ void ExtensionsDOMHandler::GetActivePagesForExtensionProcess(
}
ExtensionsDOMHandler::~ExtensionsDOMHandler() {
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (load_extension_dialog_.get())
+ load_extension_dialog_->ListenerDestroyed();
+
if (pack_job_.get())
pack_job_->ClearClient();