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

Unified Diff: Source/modules/accessibility/AXObject.cpp

Issue 1202263005: Adding Internals.numberOfLiveAXObjects to test for leaking AXObjects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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: Source/modules/accessibility/AXObject.cpp
diff --git a/Source/modules/accessibility/AXObject.cpp b/Source/modules/accessibility/AXObject.cpp
index d32949862ce207240aef7bef12bfb99dedfe2c43..7dafdd509f16ab57f924facd22070a8958a11bf9 100644
--- a/Source/modules/accessibility/AXObject.cpp
+++ b/Source/modules/accessibility/AXObject.cpp
@@ -370,6 +370,8 @@ HTMLDialogElement* getActiveDialogElement(Node* node)
} // namespace
+unsigned AXObject::s_numberOfLiveAXObjects = 0;
+
AXObject::AXObject(AXObjectCacheImpl& axObjectCache)
: m_id(0)
, m_haveChildren(false)
@@ -386,11 +388,13 @@ AXObject::AXObject(AXObjectCacheImpl& axObjectCache)
, m_cachedLiveRegionRoot(0)
, m_axObjectCache(&axObjectCache)
{
+ ++s_numberOfLiveAXObjects;
}
AXObject::~AXObject()
{
ASSERT(isDetached());
+ --s_numberOfLiveAXObjects;
}
void AXObject::detach()
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | Source/modules/accessibility/testing/InternalsAccessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698