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

Unified Diff: Source/core/layout/line/AbstractInlineTextBox.cpp

Issue 1072273006: Oilpan: Prepare moving AXObject to heap (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
« no previous file with comments | « Source/core/layout/line/AbstractInlineTextBox.h ('k') | Source/modules/accessibility/AXARIAGrid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/AbstractInlineTextBox.cpp
diff --git a/Source/core/layout/line/AbstractInlineTextBox.cpp b/Source/core/layout/line/AbstractInlineTextBox.cpp
index 4d490c5ef813ab4f93f0e5e91bbbfd268fa17044..72c5d92adad03be5a15a868139799ecbcfd7c509 100644
--- a/Source/core/layout/line/AbstractInlineTextBox.cpp
+++ b/Source/core/layout/line/AbstractInlineTextBox.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/layout/line/AbstractInlineTextBox.h"
+#include "core/dom/AXObjectCache.h"
#include "core/editing/iterators/TextIterator.h"
#include "platform/text/TextBreakIterator.h"
@@ -67,8 +68,19 @@ void AbstractInlineTextBox::willDestroy(InlineTextBox* inlineTextBox)
}
}
+AbstractInlineTextBox::~AbstractInlineTextBox()
+{
+ ASSERT(!m_layoutText);
+ ASSERT(!m_inlineTextBox);
+}
+
void AbstractInlineTextBox::detach()
{
+ if (Node* node = m_layoutText->node()) {
+ if (AXObjectCache* cache = node->document().existingAXObjectCache())
+ cache->remove(this);
+ }
+
m_layoutText = 0;
m_inlineTextBox = 0;
}
« no previous file with comments | « Source/core/layout/line/AbstractInlineTextBox.h ('k') | Source/modules/accessibility/AXARIAGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698