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

Unified Diff: ui/accessibility/platform/ax_platform_node_base.cc

Issue 1987213002: Clean up code and logic related to platform accessibility node destruction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « ui/accessibility/platform/ax_platform_node_base.h ('k') | ui/accessibility/platform/ax_platform_node_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/platform/ax_platform_node_base.cc
diff --git a/ui/accessibility/platform/ax_platform_node_base.cc b/ui/accessibility/platform/ax_platform_node_base.cc
index 4937e4d317876f64573f982ae687bddeef132d16..b3aa9d43771d26f50be36619eec2cd636c414601 100644
--- a/ui/accessibility/platform/ax_platform_node_base.cc
+++ b/ui/accessibility/platform/ax_platform_node_base.cc
@@ -46,6 +46,10 @@ gfx::NativeViewAccessible AXPlatformNodeBase::ChildAtIndex(int index) {
void AXPlatformNodeBase::Destroy() {
AXPlatformNode::Destroy();
delegate_ = nullptr;
+ Dispose();
+}
+
+void AXPlatformNodeBase::Dispose() {
delete this;
}
@@ -189,6 +193,7 @@ AXPlatformNodeBase::AXPlatformNodeBase() {
}
AXPlatformNodeBase::~AXPlatformNodeBase() {
+ CHECK(!delegate_);
}
// static
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_base.h ('k') | ui/accessibility/platform/ax_platform_node_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698