nsCycleCollectionNoteRootCallback.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /* -*- Mode: C++; tab-width: 8; 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. #ifndef nsCycleCollectionNoteRootCallback_h__
  6. #define nsCycleCollectionNoteRootCallback_h__
  7. class nsCycleCollectionParticipant;
  8. class nsISupports;
  9. class nsCycleCollectionNoteRootCallback
  10. {
  11. public:
  12. NS_IMETHOD_(void) NoteXPCOMRoot(nsISupports* aRoot) = 0;
  13. NS_IMETHOD_(void) NoteJSRoot(JSObject* aRoot) = 0;
  14. NS_IMETHOD_(void) NoteNativeRoot(void* aRoot,
  15. nsCycleCollectionParticipant* aParticipant) = 0;
  16. NS_IMETHOD_(void) NoteWeakMapping(JSObject* aMap, JS::GCCellPtr aKey,
  17. JSObject* aKeyDelegate, JS::GCCellPtr aVal) = 0;
  18. bool WantAllTraces() const { return mWantAllTraces; }
  19. protected:
  20. nsCycleCollectionNoteRootCallback() : mWantAllTraces(false) {}
  21. bool mWantAllTraces;
  22. };
  23. #endif // nsCycleCollectionNoteRootCallback_h__