Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/base/nsAccCache.h
Line
Count
Source (jump to first uncovered line)
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/. */
5
6
#ifndef _nsAccCache_H_
7
#define _nsAccCache_H_
8
9
#include "xpcAccessibleDocument.h"
10
11
////////////////////////////////////////////////////////////////////////////////
12
// Accessible cache utils
13
////////////////////////////////////////////////////////////////////////////////
14
15
template <class T>
16
void
17
UnbindCacheEntriesFromDocument(
18
  nsRefPtrHashtable<nsPtrHashKey<const void>, T>& aCache)
19
0
{
20
0
  for (auto iter = aCache.Iter(); !iter.Done(); iter.Next()) {
21
0
    T* accessible = iter.Data();
22
0
    MOZ_ASSERT(accessible && !accessible->IsDefunct());
23
0
    accessible->Document()->UnbindFromDocument(accessible);
24
0
    iter.Remove();
25
0
  }
26
0
}
Unexecuted instantiation: void UnbindCacheEntriesFromDocument<mozilla::a11y::Accessible>(nsRefPtrHashtable<nsPtrHashKey<void const>, mozilla::a11y::Accessible>&)
Unexecuted instantiation: void UnbindCacheEntriesFromDocument<mozilla::a11y::XULTreeGridCellAccessible>(nsRefPtrHashtable<nsPtrHashKey<void const>, mozilla::a11y::XULTreeGridCellAccessible>&)
27
28
#endif