Bug 1100602 - Kill child if accessibility ID is re-used (r=trevor)

This commit is contained in:
Bill McCloskey 2015-07-14 08:47:21 -07:00
parent 7ca545cb59
commit ff425fa6c1

View File

@ -67,6 +67,11 @@ DocAccessibleParent::AddSubtree(ProxyAccessible* aParent,
return 0;
}
if (mAccessibles.Contains(newChild.ID())) {
NS_ERROR("ID already in use");
return 0;
}
auto role = static_cast<a11y::role>(newChild.Role());
ProxyAccessible* newProxy =
new ProxyAccessible(newChild.ID(), aParent, this, role);