Bug 1230118 - added asserts on aOwner and aOwner->Elm() r=surkov
☠☠ backed out by 00a155011747 ☠ ☠
authorBogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Thu, 03 Dec 2015 14:07:43 -0800
changeset 309691 a9ce85f77af9188fcb7500b3e156df1ad17a49e5
parent 309690 b9d8d05aa4ee1cca71192d4d6c00900e8d1169b6
child 309692 21a130c2ba152f8603fae2d3c1fc4b089992b9ba
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1230118
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1230118 - added asserts on aOwner and aOwner->Elm() r=surkov
accessible/generic/DocAccessible.cpp
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -2017,16 +2017,19 @@ DocAccessible::ValidateARIAOwned()
   }
 }
 
 void
 DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner)
 {
   nsTArray<RefPtr<Accessible> >* children = mARIAOwnsHash.LookupOrAdd(aOwner);
 
+  MOZ_ASSERT(aOwner, "aOwner must be a valid pointer");
+  MOZ_ASSERT(aOwner->Elm(), "aOwner->Elm() must be a valid pointer");
+
   IDRefsIterator iter(this, aOwner->Elm(), nsGkAtoms::aria_owns);
   Accessible* child = nullptr;
 
   uint32_t arrayIdx = 0, insertIdx = aOwner->ChildCount() - children->Length();
   while ((child = iter.Next())) {
     // Same child on same position, no change.
     if (child->Parent() == aOwner &&
         child->IndexInParent() == static_cast<int32_t>(insertIdx)) {