| Index: ui/aura/window.cc
|
| diff --git a/ui/aura/window.cc b/ui/aura/window.cc
|
| index 692e345753bfe0f9e8366b3f350294e1377ac7b5..2655b8a0eb7d4dc6283ec5ec990052c76a5bd693 100644
|
| --- a/ui/aura/window.cc
|
| +++ b/ui/aura/window.cc
|
| @@ -168,7 +168,12 @@ Window::~Window() {
|
| // Delegate and observers need to be notified after transients are deleted.
|
| if (delegate_)
|
| delegate_->OnWindowDestroyed();
|
| - FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroyed(this));
|
| + ObserverListBase<WindowObserver>::Iterator iter(observers_);
|
| + WindowObserver* observer;
|
| + while ((observer = iter.GetNext())) {
|
| + RemoveObserver(observer);
|
| + observer->OnWindowDestroyed(this);
|
| + }
|
|
|
| // Clear properties.
|
| for (std::map<const void*, Value>::const_iterator iter = prop_map_.begin();
|
|
|