summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dom/performance/PerformanceMainThread.cpp10
-rw-r--r--dom/performance/PerformanceMainThread.h4
-rw-r--r--js/src/jsgc.cpp4
3 files changed, 7 insertions, 11 deletions
diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp
index 4c800005f..b95a91ea6 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 68b306d93..a90a53520 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;
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index 4078ac0a7..3ad526f74 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -6776,9 +6776,9 @@ js::gc::NextCellUniqueId(JSRuntime* rt)
return rt->gc.nextCellUniqueId();
}
-#ifdef MOZ_DEVTOOLS_SERVER
namespace js {
namespace gc {
+#ifdef MOZ_DEVTOOLS_SERVER
namespace MemInfo {
static bool
@@ -6994,6 +6994,7 @@ NewMemoryInfoObject(JSContext* cx)
return obj;
}
+#endif // MOZ_DEVTOOLS_SERVER
const char*
StateName(State state)
@@ -7033,7 +7034,6 @@ AutoEmptyNursery::AutoEmptyNursery(JSRuntime *rt)
} /* namespace gc */
} /* namespace js */
-#endif
#ifdef DEBUG
void