| Index: mojo/services/public/cpp/view_manager/lib/view.cc
|
| diff --git a/mojo/services/public/cpp/view_manager/lib/view.cc b/mojo/services/public/cpp/view_manager/lib/view.cc
|
| index be4397ba4740ff77534db358048c213143dfcada..0e2738f22dc06c2f7f910e9289208468bbe0a0a9 100644
|
| --- a/mojo/services/public/cpp/view_manager/lib/view.cc
|
| +++ b/mojo/services/public/cpp/view_manager/lib/view.cc
|
| @@ -79,9 +79,13 @@ View::View()
|
| manager_(NULL) {}
|
|
|
| View::~View() {
|
| - ScopedDestructionNotifier notifier(this);
|
| - if (manager_)
|
| - ViewManagerPrivate(manager_).RemoveView(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 (manager_)
|
| + ViewManagerPrivate(manager_).RemoveView(id_);
|
| + }
|
| }
|
|
|
| void View::LocalDestroy() {
|
|
|