Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/xpcom/base/nsCycleCollectionNoteRootCallback.h
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
#ifndef nsCycleCollectionNoteRootCallback_h__
8
#define nsCycleCollectionNoteRootCallback_h__
9
10
class nsCycleCollectionParticipant;
11
class nsISupports;
12
13
class nsCycleCollectionNoteRootCallback
14
{
15
public:
16
  // aRoot must be canonical (ie the result of QIing to nsCycleCollectionISupports).
17
  NS_IMETHOD_(void) NoteXPCOMRoot(nsISupports* aRoot,
18
                                  nsCycleCollectionParticipant* aParticipant) = 0;
19
20
  NS_IMETHOD_(void) NoteJSRoot(JSObject* aRoot) = 0;
21
  NS_IMETHOD_(void) NoteNativeRoot(void* aRoot,
22
                                   nsCycleCollectionParticipant* aParticipant) = 0;
23
24
  NS_IMETHOD_(void) NoteWeakMapping(JSObject* aMap, JS::GCCellPtr aKey,
25
                                    JSObject* aKeyDelegate, JS::GCCellPtr aVal) = 0;
26
27
0
  bool WantAllTraces() const { return mWantAllTraces; }
28
protected:
29
0
  nsCycleCollectionNoteRootCallback() : mWantAllTraces(false) {}
30
31
  bool mWantAllTraces;
32
};
33
34
#endif // nsCycleCollectionNoteRootCallback_h__