diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index cd7c0d18d7c1..f14177acab0f 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -1099,16 +1099,6 @@ public: { } - virtual void - BeginCycleCollectionCallback() override - { - } - - virtual void - EndCycleCollectionCallback(CycleCollectorResults &aResults) override - { - } - void DispatchDeferredDeletion(bool aContinuation, bool aPurge) override { diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index 909e54b8e028..1fbe657387b8 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -665,6 +665,7 @@ XPCJSContext::PrepareForForgetSkippable() void XPCJSContext::BeginCycleCollectionCallback() { + CycleCollectedJSContext::BeginCycleCollectionCallback(); nsJSContext::BeginCycleCollectionCallback(); nsCOMPtr obs = mozilla::services::GetObserverService(); @@ -676,6 +677,7 @@ XPCJSContext::BeginCycleCollectionCallback() void XPCJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults) { + CycleCollectedJSContext::EndCycleCollectionCallback(aResults); nsJSContext::EndCycleCollectionCallback(aResults); nsCOMPtr obs = mozilla::services::GetObserverService(); diff --git a/xpcom/base/CycleCollectedJSContext.cpp b/xpcom/base/CycleCollectedJSContext.cpp index 93b0dc3d839f..b0b4347685b6 100644 --- a/xpcom/base/CycleCollectedJSContext.cpp +++ b/xpcom/base/CycleCollectedJSContext.cpp @@ -1330,6 +1330,16 @@ CycleCollectedJSContext::DumpJSHeap(FILE* aFile) js::DumpHeap(Context(), aFile, js::CollectNurseryBeforeDump); } +void +CycleCollectedJSContext::BeginCycleCollectionCallback() +{ +} + +void +CycleCollectedJSContext::EndCycleCollectionCallback(CycleCollectorResults& aResults) +{ +} + void CycleCollectedJSContext::ProcessStableStateQueue() { diff --git a/xpcom/base/CycleCollectedJSContext.h b/xpcom/base/CycleCollectedJSContext.h index 9415634b8951..130734b44969 100644 --- a/xpcom/base/CycleCollectedJSContext.h +++ b/xpcom/base/CycleCollectedJSContext.h @@ -321,8 +321,8 @@ public: void DumpJSHeap(FILE* aFile); virtual void PrepareForForgetSkippable() = 0; - virtual void BeginCycleCollectionCallback() = 0; - virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults) = 0; + virtual void BeginCycleCollectionCallback(); + virtual void EndCycleCollectionCallback(CycleCollectorResults& aResults); virtual void DispatchDeferredDeletion(bool aContinuation, bool aPurge = false) = 0; JSContext* Context() const