summaryrefslogtreecommitdiff
path: root/dom/performance
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-20 16:47:04 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:48:23 +0200
commit201be4d8fcd78484ad2132d16fd5c06448a41aca (patch)
treee90488fffeb4a2cc3b31a34d6307b11b56034f27 /dom/performance
parent9e586a1d0ebe7539cf9695d5755c8647fd17bc51 (diff)
downloaduxp-201be4d8fcd78484ad2132d16fd5c06448a41aca.tar.gz
Issue #316 - Be more gentle with the CC and nursery.
Diffstat (limited to 'dom/performance')
-rw-r--r--dom/performance/PerformanceMainThread.cpp10
-rw-r--r--dom/performance/PerformanceMainThread.h4
2 files changed, 5 insertions, 9 deletions
diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp
index 4c800005fe..b95a91ea67 100644
--- a/dom/performance/PerformanceMainThread.cpp
+++ b/dom/performance/PerformanceMainThread.cpp
@@ -11,7 +11,7 @@
namespace mozilla {
namespace dom {
-#ifdef MOZ_DEVTOOLS_SERVER
+
NS_IMPL_CYCLE_COLLECTION_CLASS(PerformanceMainThread)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PerformanceMainThread,
@@ -19,8 +19,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PerformanceMainThread,
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTiming,
mNavigation,
mDocEntry)
+#ifdef MOZ_DEVTOOLS_SERVER
tmp->mMozMemory = nullptr;
mozilla::DropJSObjects(this);
+#endif
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PerformanceMainThread,
@@ -32,15 +34,13 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PerformanceMainThread,
Performance)
+#ifdef MOZ_DEVTOOLS_SERVER
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mMozMemory)
+#endif
NS_IMPL_CYCLE_COLLECTION_TRACE_END
NS_IMPL_ADDREF_INHERITED(PerformanceMainThread, Performance)
NS_IMPL_RELEASE_INHERITED(PerformanceMainThread, Performance)
-#else
-NS_IMPL_CYCLE_COLLECTION_INHERITED(PerformanceMainThread, Performance
- mTiming, mNavigation, mDocEntry)
-#endif
// QueryInterface implementation for PerformanceMainThread
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceMainThread)
diff --git a/dom/performance/PerformanceMainThread.h b/dom/performance/PerformanceMainThread.h
index 68b306d93a..a90a535206 100644
--- a/dom/performance/PerformanceMainThread.h
+++ b/dom/performance/PerformanceMainThread.h
@@ -20,12 +20,8 @@ public:
nsITimedChannel* aChannel);
NS_DECL_ISUPPORTS_INHERITED
-#ifdef MOZ_DEVTOOLS_SERVER
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(PerformanceMainThread,
Performance)
-#else
- NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(PerformanceMainThread, Performance)
-#endif
virtual PerformanceTiming* Timing() override;