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

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

Issue 1137873004: Avoid a double delete of BrowserUI on shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« 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: mandoline/ui/browser/browser.cc
diff --git a/mandoline/ui/browser/browser.cc b/mandoline/ui/browser/browser.cc
index 19d0d130331b82d49098117a284138d5855cfb2c..f9191f3ac433575d72159bd266e04290eb701a33 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -40,6 +40,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) {
« 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