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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 1207613004: Fix leaking AXNodeObjects when sub document detaches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 1 month 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: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index dd38c52ffd845461352cb724f04884cb149bffc5..f5a7b285e145933941a213ac8dabfa49f07a4c3b 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -2142,6 +2142,7 @@ static Node* getParentNodeForComputeParent(Node* node)
AXObject* AXNodeObject::computeParent() const
{
+ ASSERT(!isDetached());
if (Node* parentNode = getParentNodeForComputeParent(node()))
return axObjectCache().getOrCreate(parentNode);
@@ -2183,6 +2184,7 @@ AXObject* AXNodeObject::nextSibling() const
void AXNodeObject::addChildren()
{
+ ASSERT(!isDetached());
// If the need to add more children in addition to existing children arises,
// childrenChanged should have been called, leaving the object with no children.
ASSERT(!m_haveChildren);

Powered by Google App Engine
This is Rietveld 408576698