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

Unified Diff: ui/views/view.cc

Issue 2750633004: Adds code to isolate use-after-free in Views (Closed)
Patch Set: rename to observed_view Created 3 years, 9 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
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 359ef565fd88ae041f2769b70f6fc87f3360237d..86624f8a2f6c59939bfa1d3a1ecbd335aec8fecb 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -163,6 +163,9 @@ View::~View() {
delete child;
}
}
+
+ for (ViewObserver& observer : observers_)
+ observer.OnViewIsDeleting(this);
}
// Tree operations -------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698