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

Unified Diff: Source/modules/accessibility/AXLayoutObject.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, 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
Index: Source/modules/accessibility/AXLayoutObject.cpp
diff --git a/Source/modules/accessibility/AXLayoutObject.cpp b/Source/modules/accessibility/AXLayoutObject.cpp
index a8bebb3326de950ddcbef00a7acb37130bfe5904..7ec770f07202b2c29641722d37d147b71b65f7f8 100644
--- a/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/Source/modules/accessibility/AXLayoutObject.cpp
@@ -181,9 +181,9 @@ AXLayoutObject::AXLayoutObject(LayoutObject* layoutObject, AXObjectCacheImpl* ax
#endif
}
-PassRefPtr<AXLayoutObject> AXLayoutObject::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtrWillBeRawPtr<AXLayoutObject> AXLayoutObject::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
{
- return adoptRef(new AXLayoutObject(layoutObject, axObjectCache));
+ return adoptRefWillBeNoop(new AXLayoutObject(layoutObject, axObjectCache));
}
AXLayoutObject::~AXLayoutObject()
@@ -1693,7 +1693,7 @@ void AXLayoutObject::addChildren()
if (!canHaveChildren())
return;
- for (RefPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSibling())
+ for (RefPtrWillBeRawPtr<AXObject> obj = firstChild(); obj; obj = obj->nextSibling())
addChild(obj.get());
addHiddenChildren();
@@ -2348,10 +2348,15 @@ void AXLayoutObject::addImageMapChildren()
areaObject->setHTMLAreaElement(&area);
areaObject->setHTMLMapElement(map);
areaObject->setParent(this);
- if (!areaObject->accessibilityIsIgnored())
+ if (!areaObject->accessibilityIsIgnored()) {
m_children.append(areaObject);
- else
+ } else {
+#if ENABLE(OILPAN)
+ axObjectCache()->remove(areaObject);
+#else
axObjectCache()->remove(areaObject->axObjectID());
+#endif
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698