Chromium Code Reviews| 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) { |