Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / xpcom / base / nsCycleCollectionNoteRootCallback.h
blob21dc89394ad0ac76f0daab14782db3005ea57996
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/. */
7 #ifndef nsCycleCollectionNoteRootCallback_h__
8 #define nsCycleCollectionNoteRootCallback_h__
10 #include "nscore.h"
12 class nsCycleCollectionParticipant;
13 class nsISupports;
14 class JSObject;
16 namespace JS {
17 class GCCellPtr;
20 class nsCycleCollectionNoteRootCallback {
21 public:
22 // aRoot must be canonical (ie the result of QIing to
23 // nsCycleCollectionISupports).
24 NS_IMETHOD_(void)
25 NoteXPCOMRoot(nsISupports* aRoot,
26 nsCycleCollectionParticipant* aParticipant) = 0;
28 NS_IMETHOD_(void) NoteJSRoot(JSObject* aRoot) = 0;
29 NS_IMETHOD_(void)
30 NoteNativeRoot(void* aRoot, nsCycleCollectionParticipant* aParticipant) = 0;
32 NS_IMETHOD_(void)
33 NoteWeakMapping(JSObject* aMap, JS::GCCellPtr aKey, JSObject* aKeyDelegate,
34 JS::GCCellPtr aVal) = 0;
36 bool WantAllTraces() const { return mWantAllTraces; }
38 protected:
39 nsCycleCollectionNoteRootCallback() : mWantAllTraces(false) {}
41 bool mWantAllTraces;
44 #endif // nsCycleCollectionNoteRootCallback_h__