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__
12 class nsCycleCollectionParticipant
;
20 class nsCycleCollectionNoteRootCallback
{
22 // aRoot must be canonical (ie the result of QIing to
23 // nsCycleCollectionISupports).
25 NoteXPCOMRoot(nsISupports
* aRoot
,
26 nsCycleCollectionParticipant
* aParticipant
) = 0;
28 NS_IMETHOD_(void) NoteJSRoot(JSObject
* aRoot
) = 0;
30 NoteNativeRoot(void* aRoot
, nsCycleCollectionParticipant
* aParticipant
) = 0;
33 NoteWeakMapping(JSObject
* aMap
, JS::GCCellPtr aKey
, JSObject
* aKeyDelegate
,
34 JS::GCCellPtr aVal
) = 0;
36 bool WantAllTraces() const { return mWantAllTraces
; }
39 nsCycleCollectionNoteRootCallback() : mWantAllTraces(false) {}
44 #endif // nsCycleCollectionNoteRootCallback_h__