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

Unified Diff: mandoline/ui/browser/browser.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix X errors on Linux Created 5 years, 7 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
Index: mandoline/ui/browser/browser.cc
diff --git a/mandoline/ui/browser/browser.cc b/mandoline/ui/browser/browser.cc
index 202c76cae580b4859ec24bddaa3b2811b093a79b..4697e40afc2370071f55ee999a83d956ec88e7dc 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -26,6 +26,10 @@ Browser::Browser()
}
Browser::~Browser() {
+ // Destruct ui_ manually while |this| is alive and reset the pointer first.
+ // This is to avoid a double delete when OnViewManagerDisconnected gets
+ // called.
+ delete ui_.release();
}
void Browser::ReplaceContentWithURL(const mojo::String& url) {

Powered by Google App Engine
This is Rietveld 408576698