| Index: services/ui/public/cpp/window.cc
|
| diff --git a/services/ui/public/cpp/window.cc b/services/ui/public/cpp/window.cc
|
| index bc20d45694df46c8b8674b5e938223b1a56146a5..966e51888c18a26e688a91a45c1a44010347b7a9 100644
|
| --- a/services/ui/public/cpp/window.cc
|
| +++ b/services/ui/public/cpp/window.cc
|
| @@ -553,6 +553,9 @@ Window::~Window() {
|
| DCHECK(children_.empty() || children_.front() != child);
|
| }
|
|
|
| + // Notify observers before clearing properties (order matches aura::Window).
|
| + FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroyed(this));
|
| +
|
| // Clear properties.
|
| for (auto& pair : prop_map_) {
|
| if (pair.second.deallocator)
|
| @@ -560,8 +563,6 @@ Window::~Window() {
|
| }
|
| prop_map_.clear();
|
|
|
| - FOR_EACH_OBSERVER(WindowObserver, observers_, OnWindowDestroyed(this));
|
| -
|
| // Invoke after observers so that can clean up any internal state observers
|
| // may have changed.
|
| if (window_tree())
|
|
|