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

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

Issue 1175533004: Refactor: Clear m_axObjectCache when AXObject detaches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added ASSERT 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/modules/accessibility/AXTableCell.h ('k') | Source/modules/accessibility/AXTableColumn.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTableCell.cpp
diff --git a/Source/modules/accessibility/AXTableCell.cpp b/Source/modules/accessibility/AXTableCell.cpp
index a7a3d5dfad9183dae2c625012c3bae1a30099d21..4573ae51e3de76abb8a1ae1c05376b27fb9d9dba 100644
--- a/Source/modules/accessibility/AXTableCell.cpp
+++ b/Source/modules/accessibility/AXTableCell.cpp
@@ -37,7 +37,7 @@ namespace blink {
using namespace HTMLNames;
-AXTableCell::AXTableCell(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+AXTableCell::AXTableCell(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
: AXLayoutObject(layoutObject, axObjectCache)
{
}
@@ -46,7 +46,7 @@ AXTableCell::~AXTableCell()
{
}
-PassRefPtr<AXTableCell> AXTableCell::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXTableCell> AXTableCell::create(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXTableCell(layoutObject, axObjectCache));
}
@@ -88,7 +88,7 @@ AXObject* AXTableCell::parentTable() const
return 0;
// If the document no longer exists, we might not have an axObjectCache.
- if (!axObjectCache())
+ if (isDetached())
return 0;
// Do not use getOrCreate. parentTable() can be called while the layout tree is being modified
@@ -96,7 +96,7 @@ AXObject* AXTableCell::parentTable() const
// By using only get() implies that the AXTable must be created before AXTableCells. This should
// always be the case when AT clients access a table.
// https://bugs.webkit.org/show_bug.cgi?id=42652
- return axObjectCache()->get(toLayoutTableCell(m_layoutObject)->table());
+ return axObjectCache().get(toLayoutTableCell(m_layoutObject)->table());
}
bool AXTableCell::isTableCell() const
@@ -252,7 +252,7 @@ AXObject* AXTableCell::deprecatedTitleUIElement() const
if (!cellElement || !cellElement->hasTagName(thTag))
return 0;
- return axObjectCache()->getOrCreate(headerCell);
+ return axObjectCache().getOrCreate(headerCell);
}
} // namespace blink
« no previous file with comments | « Source/modules/accessibility/AXTableCell.h ('k') | Source/modules/accessibility/AXTableColumn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698