| Index: mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
|
| diff --git a/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc b/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
|
| index 03628acb7fc47c065c4626a291ab8e5ed5653003..7da69209528f0524a451893848b2714140092489 100644
|
| --- a/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
|
| +++ b/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
|
| @@ -286,11 +286,15 @@ ViewTreeNode::ViewTreeNode()
|
| active_view_(NULL) {}
|
|
|
| ViewTreeNode::~ViewTreeNode() {
|
| - ScopedDestructionNotifier notifier(this);
|
| - if (parent_)
|
| - parent_->LocalRemoveChild(this);
|
| - if (manager_)
|
| - ViewManagerPrivate(manager_).RemoveNode(id_);
|
| + {
|
| + // TODO(beng): I'm not sure I like these scoped destruction notifiers.
|
| + // When they fall out of scope |this| is toast.
|
| + ScopedDestructionNotifier notifier(this);
|
| + if (parent_)
|
| + parent_->LocalRemoveChild(this);
|
| + if (manager_)
|
| + ViewManagerPrivate(manager_).RemoveNode(id_);
|
| + }
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|