/src/mozilla-central/dom/bindings/IterableIterator.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "mozilla/dom/IterableIterator.h" |
8 | | |
9 | | namespace mozilla { |
10 | | namespace dom { |
11 | | |
12 | | // Due to IterableIterator being a templated class, we implement the necessary |
13 | | // CC bits in a superclass that IterableIterator then inherits from. This allows |
14 | | // us to put the macros outside of the header. The base class has pure virtual |
15 | | // functions for Traverse/Unlink that the templated subclasses will override. |
16 | | |
17 | | NS_IMPL_CYCLE_COLLECTION_CLASS(IterableIteratorBase) |
18 | | |
19 | | NS_IMPL_CYCLE_COLLECTING_ADDREF(IterableIteratorBase) |
20 | | NS_IMPL_CYCLE_COLLECTING_RELEASE(IterableIteratorBase) |
21 | | |
22 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(IterableIteratorBase) |
23 | 0 | tmp->TraverseHelper(cb); |
24 | 0 | NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END |
25 | | |
26 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(IterableIteratorBase) |
27 | 0 | tmp->UnlinkHelper(); |
28 | 0 | NS_IMPL_CYCLE_COLLECTION_UNLINK_END |
29 | | |
30 | 0 | NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IterableIteratorBase) |
31 | 0 | NS_INTERFACE_MAP_ENTRY(nsISupports) |
32 | 0 | NS_INTERFACE_MAP_END |
33 | | |
34 | | } |
35 | | } |