diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 943b501ef7..5ec720dfef 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2302,13 +2302,11 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow) NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER NS_IMPL_CYCLE_COLLECTION_UNLINK_END -#ifdef DEBUG void nsGlobalWindow::RiskyUnlink() { NS_CYCLE_COLLECTION_INNERNAME.Unlink(this); } -#endif NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsGlobalWindow) if (tmp->mCachedXBLPrototypeHandlers) { diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index c59baee648..564dcee500 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -597,11 +597,9 @@ public: NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsGlobalWindow, nsIDOMEventTarget) -#ifdef DEBUG // Call Unlink on this window. This may cause bad things to happen, so use // with caution. void RiskyUnlink(); -#endif virtual JSObject* GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) override; diff --git a/dom/base/nsWindowMemoryReporter.cpp b/dom/base/nsWindowMemoryReporter.cpp index bf6eb6342e..82ccb5b350 100644 --- a/dom/base/nsWindowMemoryReporter.cpp +++ b/dom/base/nsWindowMemoryReporter.cpp @@ -829,7 +829,6 @@ nsWindowMemoryReporter::KillCheckTimer() } } -#ifdef DEBUG /* static */ void nsWindowMemoryReporter::UnlinkGhostWindows() { @@ -866,4 +865,3 @@ nsWindowMemoryReporter::UnlinkGhostWindows() } } } -#endif diff --git a/dom/base/nsWindowMemoryReporter.h b/dom/base/nsWindowMemoryReporter.h index 6cf72519da..1fd82431aa 100644 --- a/dom/base/nsWindowMemoryReporter.h +++ b/dom/base/nsWindowMemoryReporter.h @@ -150,13 +150,11 @@ public: static void Init(); -#ifdef DEBUG /** * Unlink all known ghost windows, to enable investigating what caused them * to become ghost windows in the first place. */ static void UnlinkGhostWindows(); -#endif static nsWindowMemoryReporter* Get(); void ObserveDOMWindowDetached(nsGlobalWindow* aWindow); diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 70103dfd17..0de7ee3adb 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -2664,12 +2664,8 @@ nsXPCComponents_Utils::SchedulePreciseShrinkingGC(ScheduledGCCallback* aCallback NS_IMETHODIMP nsXPCComponents_Utils::UnlinkGhostWindows() { -#ifdef DEBUG nsWindowMemoryReporter::UnlinkGhostWindows(); return NS_OK; -#else - return NS_ERROR_NOT_IMPLEMENTED; -#endif } NS_IMETHODIMP