summaryrefslogtreecommitdiffstats
path: root/devtools/shared/jsinspector/nsJSInspector.h
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-09-26 17:49:21 -0400
committerMatt A. Tobin <email@mattatobin.com>2018-09-26 17:49:21 -0400
commita549e0c4a3aceedacd3bd70f9df9629cac57f0c4 (patch)
tree4b4d5316f0092383c9678fccda4f40d064f3449f /devtools/shared/jsinspector/nsJSInspector.h
parent6297b563deedb5c7c9d2f135c02bc4c1214aacf4 (diff)
downloadUXP-a549e0c4a3aceedacd3bd70f9df9629cac57f0c4.tar
UXP-a549e0c4a3aceedacd3bd70f9df9629cac57f0c4.tar.gz
UXP-a549e0c4a3aceedacd3bd70f9df9629cac57f0c4.tar.lz
UXP-a549e0c4a3aceedacd3bd70f9df9629cac57f0c4.tar.xz
UXP-a549e0c4a3aceedacd3bd70f9df9629cac57f0c4.zip
Build nsJSInspector regardless of devtools
Diffstat (limited to 'devtools/shared/jsinspector/nsJSInspector.h')
-rw-r--r--devtools/shared/jsinspector/nsJSInspector.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/devtools/shared/jsinspector/nsJSInspector.h b/devtools/shared/jsinspector/nsJSInspector.h
new file mode 100644
index 000000000..4e60b0428
--- /dev/null
+++ b/devtools/shared/jsinspector/nsJSInspector.h
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef COMPONENTS_JSINSPECTOR_H
+#define COMPONENTS_JSINSPECTOR_H
+
+#include "nsIJSInspector.h"
+#include "mozilla/Attributes.h"
+#include "nsCycleCollectionParticipant.h"
+#include "nsTArray.h"
+#include "js/Value.h"
+#include "js/RootingAPI.h"
+
+namespace mozilla {
+namespace jsinspector {
+
+class nsJSInspector final : public nsIJSInspector
+{
+public:
+ NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+ NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsJSInspector)
+ NS_DECL_NSIJSINSPECTOR
+
+ nsJSInspector();
+
+private:
+ ~nsJSInspector();
+
+ uint32_t mNestedLoopLevel;
+ nsTArray<JS::Heap<JS::Value> > mRequestors;
+ JS::Heap<JS::Value> mLastRequestor;
+};
+
+} // namespace jsinspector
+} // namespace mozilla
+
+#endif