nsJSInspector.h 984 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* -*- Mode: C++; tab-width: 2; 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 COMPONENTS_JSINSPECTOR_H
  6. #define COMPONENTS_JSINSPECTOR_H
  7. #include "nsIJSInspector.h"
  8. #include "mozilla/Attributes.h"
  9. #include "nsCycleCollectionParticipant.h"
  10. #include "nsTArray.h"
  11. #include "js/Value.h"
  12. #include "js/RootingAPI.h"
  13. namespace mozilla {
  14. namespace jsinspector {
  15. class nsJSInspector final : public nsIJSInspector
  16. {
  17. public:
  18. NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  19. NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsJSInspector)
  20. NS_DECL_NSIJSINSPECTOR
  21. nsJSInspector();
  22. private:
  23. ~nsJSInspector();
  24. uint32_t mNestedLoopLevel;
  25. nsTArray<JS::Heap<JS::Value> > mRequestors;
  26. JS::Heap<JS::Value> mLastRequestor;
  27. };
  28. } // namespace jsinspector
  29. } // namespace mozilla
  30. #endif