mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #2251 - Expose ghost window unlinking to release builds.
This commit is contained in:
parent
2b4e577d8e
commit
97a40adc75
5 changed files with 0 additions and 12 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -829,7 +829,6 @@ nsWindowMemoryReporter::KillCheckTimer()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
/* static */ void
|
||||
nsWindowMemoryReporter::UnlinkGhostWindows()
|
||||
{
|
||||
|
|
@ -866,4 +865,3 @@ nsWindowMemoryReporter::UnlinkGhostWindows()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue