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

Unified Diff: services/ui/public/cpp/window.cc

Issue 2411913003: Converts ash/wm/mru_window_tracker_unittest.cc to use AshTest (Closed)
Patch Set: comment 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 | « ash/wm/mru_window_tracker_unittest.cc ('k') | services/ui/public/interfaces/window_manager.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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())
« no previous file with comments | « ash/wm/mru_window_tracker_unittest.cc ('k') | services/ui/public/interfaces/window_manager.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698