no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / accessible / base / nsAccCache.h
blobdb0c87703577ed2fec2c2d7aebb60b72949fe3b8
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef _nsAccCache_H_
7 #define _nsAccCache_H_
9 ////////////////////////////////////////////////////////////////////////////////
10 // LocalAccessible cache utils
11 ////////////////////////////////////////////////////////////////////////////////
13 template <class T>
14 void UnbindCacheEntriesFromDocument(
15 nsRefPtrHashtable<nsPtrHashKey<const void>, T>& aCache) {
16 for (auto iter = aCache.Iter(); !iter.Done(); iter.Next()) {
17 T* accessible = iter.Data();
18 MOZ_ASSERT(accessible && !accessible->IsDefunct());
19 accessible->Document()->UnbindFromDocument(accessible);
20 iter.Remove();
24 #endif