Skip to content

Commit

Permalink
Merge inbound to central, a=merge
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 2omKclRg40c
  • Loading branch information
KWierso committed Mar 21, 2017
2 parents 0104e2c + af45532 commit 4f52624
Show file tree
Hide file tree
Showing 116 changed files with 3,747 additions and 1,532 deletions.
17 changes: 0 additions & 17 deletions accessible/base/nsAccCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,4 @@ UnbindCacheEntriesFromDocument(
}
}

/**
* Clear the cache and shutdown the accessibles.
*/
template <class T>
static void
ClearCache(nsRefPtrHashtable<nsPtrHashKey<const void>, T>& aCache)
{
for (auto iter = aCache.Iter(); !iter.Done(); iter.Next()) {
T* accessible = iter.Data();
MOZ_ASSERT(accessible);
if (accessible && !accessible->IsDefunct()) {
accessible->Shutdown();
}
iter.Remove();
}
}

#endif
12 changes: 11 additions & 1 deletion accessible/generic/DocAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,17 @@ DocAccessible::Shutdown()

mDependentIDsHash.Clear();
mNodeToAccessibleMap.Clear();
ClearCache(mAccessibleCache);

for (auto iter = mAccessibleCache.Iter(); !iter.Done(); iter.Next()) {
Accessible* accessible = iter.Data();
MOZ_ASSERT(accessible);
if (accessible && !accessible->IsDefunct()) {
// Unlink parent to avoid its cleaning overhead in shutdown.
accessible->mParent = nullptr;
accessible->Shutdown();
}
iter.Remove();
}

HyperTextAccessibleWrap::Shutdown();

Expand Down
Loading

0 comments on commit 4f52624

Please sign in to comment.