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

Unified Diff: ui/views/view.cc

Issue 2414103003: Added common layout framework for system menu rows. (Closed)
Patch Set: Moved |layout_manager_| destruction order in ~View(). Created 4 years, 2 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 | « ui/views/test/test_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 3cb42dca9dab0b6b57422f07348b4cc15293f3fa..d5da6b5b07f827138f42f7776b2f301d3001f928 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -128,6 +128,10 @@ View::~View() {
ViewStorage::GetInstance()->ViewRemoved(this);
+ // Some layout managers hold a reference to the host that they are installed
+ // to and may need to access this during destruction.
+ layout_manager_.reset();
+
for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) {
(*i)->parent_ = NULL;
if (!(*i)->owned_by_client_)
« no previous file with comments | « ui/views/test/test_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698