summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc1
-rw-r--r--chrome/browser/ui/webui/certificate_viewer_webui.cc1
-rw-r--r--chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc4
-rw-r--r--chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h2
-rw-r--r--chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc1
-rw-r--r--tools/valgrind/memcheck/suppressions.txt16
-rw-r--r--ui/web_dialogs/web_dialog_delegate.h1
7 files changed, 3 insertions, 23 deletions
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index c943195..4526b16 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -137,7 +137,6 @@ std::string PrintPreviewTabDelegate::GetDialogArgs() const {
void PrintPreviewTabDelegate::OnDialogClosed(
const std::string& /* json_retval */) {
- delete this;
}
void PrintPreviewTabDelegate::OnCloseContents(WebContents* /* source */,
diff --git a/chrome/browser/ui/webui/certificate_viewer_webui.cc b/chrome/browser/ui/webui/certificate_viewer_webui.cc
index de31216..f46b65a 100644
--- a/chrome/browser/ui/webui/certificate_viewer_webui.cc
+++ b/chrome/browser/ui/webui/certificate_viewer_webui.cc
@@ -207,7 +207,6 @@ void CertificateViewerDialog::OnDialogShown(
}
void CertificateViewerDialog::OnDialogClosed(const std::string& json_retval) {
- delete this;
}
void CertificateViewerDialog::OnCloseContents(WebContents* source,
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
index c9d9c4d..4b03d5c 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
+++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc
@@ -56,12 +56,12 @@ ConstrainedWebDialogDelegateBase::~ConstrainedWebDialogDelegateBase() {
const WebDialogDelegate*
ConstrainedWebDialogDelegateBase::GetWebDialogDelegate() const {
- return web_dialog_delegate_;
+ return web_dialog_delegate_.get();
}
WebDialogDelegate*
ConstrainedWebDialogDelegateBase::GetWebDialogDelegate() {
- return web_dialog_delegate_;
+ return web_dialog_delegate_.get();
}
void ConstrainedWebDialogDelegateBase::OnDialogCloseFromWebUI() {
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
index 1d87112..ba7ab12 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
+++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
@@ -48,7 +48,7 @@ class ConstrainedWebDialogDelegateBase
WebDialogWebContentsDelegate* override_tab_delegate);
private:
- ui::WebDialogDelegate* web_dialog_delegate_;
+ scoped_ptr<ui::WebDialogDelegate> web_dialog_delegate_;
// The constrained window that owns |this|. Saved so we can close it later.
ConstrainedWindow* window_;
diff --git a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
index 6a2b624..5e6cebb 100644
--- a/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
+++ b/chrome/browser/ui/webui/tab_modal_confirm_dialog_webui.cc
@@ -109,7 +109,6 @@ void TabModalConfirmDialogWebUI::OnDialogClosed(
delegate_->Accept();
else
delegate_->Cancel();
- delete this;
}
void TabModalConfirmDialogWebUI::OnCloseContents(WebContents* source,
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt
index 4bead1d..4305687 100644
--- a/tools/valgrind/memcheck/suppressions.txt
+++ b/tools/valgrind/memcheck/suppressions.txt
@@ -5720,14 +5720,6 @@
fun:_ZN7WebCore18StyleSheetContents26requestImportedStyleSheetsEPNS_13CSSStyleSheetE
}
{
- bug_145644a
- Memcheck:Leak
- fun:_Znw*
- fun:_ZN46ConstrainedWebDialogBrowserTest_BasicTest_Test19RunTestOnMainThreadEv
- fun:_ZN20InProcessBrowserTest23RunTestOnMainThreadLoopEv
- fun:_ZN7content15BrowserTestBase28ProxyRunTestOnMainThreadLoopEv
-}
-{
bug_145645
Memcheck:Leak
fun:malloc
@@ -5739,14 +5731,6 @@
fun:_ZN7WebCore25WorkerInspectorControllerC1EPNS_13WorkerContextE
}
{
- bug_145644b
- Memcheck:Leak
- fun:_Znw*
- fun:_ZN68ConstrainedWebDialogBrowserTest_ReleaseTabContentsOnDialogClose_Test19RunTestOnMainThreadEv
- fun:_ZN20InProcessBrowserTest23RunTestOnMainThreadLoopEv
- fun:_ZN7content15BrowserTestBase28ProxyRunTestOnMainThreadLoopEv
-}
-{
bug_145650a
Memcheck:Leak
fun:_Znw*
diff --git a/ui/web_dialogs/web_dialog_delegate.h b/ui/web_dialogs/web_dialog_delegate.h
index 51fafa2..7cbde25 100644
--- a/ui/web_dialogs/web_dialog_delegate.h
+++ b/ui/web_dialogs/web_dialog_delegate.h
@@ -117,7 +117,6 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate {
// Stores the dialog bounds.
virtual void StoreDialogSize(const gfx::Size& dialog_size) {}
- protected:
virtual ~WebDialogDelegate() {}
};