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/. */
9 ////////////////////////////////////////////////////////////////////////////////
10 // LocalAccessible cache utils
11 ////////////////////////////////////////////////////////////////////////////////
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
);