mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 01:27:30 +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_PRESERVED_WRAPPER
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
void
|
void
|
||||||
nsGlobalWindow::RiskyUnlink()
|
nsGlobalWindow::RiskyUnlink()
|
||||||
{
|
{
|
||||||
NS_CYCLE_COLLECTION_INNERNAME.Unlink(this);
|
NS_CYCLE_COLLECTION_INNERNAME.Unlink(this);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsGlobalWindow)
|
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsGlobalWindow)
|
||||||
if (tmp->mCachedXBLPrototypeHandlers) {
|
if (tmp->mCachedXBLPrototypeHandlers) {
|
||||||
|
|
|
||||||
|
|
@ -597,11 +597,9 @@ public:
|
||||||
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsGlobalWindow,
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsGlobalWindow,
|
||||||
nsIDOMEventTarget)
|
nsIDOMEventTarget)
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
// Call Unlink on this window. This may cause bad things to happen, so use
|
// Call Unlink on this window. This may cause bad things to happen, so use
|
||||||
// with caution.
|
// with caution.
|
||||||
void RiskyUnlink();
|
void RiskyUnlink();
|
||||||
#endif
|
|
||||||
|
|
||||||
virtual JSObject*
|
virtual JSObject*
|
||||||
GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) override;
|
GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) override;
|
||||||
|
|
|
||||||
|
|
@ -829,7 +829,6 @@ nsWindowMemoryReporter::KillCheckTimer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
nsWindowMemoryReporter::UnlinkGhostWindows()
|
nsWindowMemoryReporter::UnlinkGhostWindows()
|
||||||
{
|
{
|
||||||
|
|
@ -866,4 +865,3 @@ nsWindowMemoryReporter::UnlinkGhostWindows()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -150,13 +150,11 @@ public:
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
/**
|
/**
|
||||||
* Unlink all known ghost windows, to enable investigating what caused them
|
* Unlink all known ghost windows, to enable investigating what caused them
|
||||||
* to become ghost windows in the first place.
|
* to become ghost windows in the first place.
|
||||||
*/
|
*/
|
||||||
static void UnlinkGhostWindows();
|
static void UnlinkGhostWindows();
|
||||||
#endif
|
|
||||||
|
|
||||||
static nsWindowMemoryReporter* Get();
|
static nsWindowMemoryReporter* Get();
|
||||||
void ObserveDOMWindowDetached(nsGlobalWindow* aWindow);
|
void ObserveDOMWindowDetached(nsGlobalWindow* aWindow);
|
||||||
|
|
|
||||||
|
|
@ -2664,12 +2664,8 @@ nsXPCComponents_Utils::SchedulePreciseShrinkingGC(ScheduledGCCallback* aCallback
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsXPCComponents_Utils::UnlinkGhostWindows()
|
nsXPCComponents_Utils::UnlinkGhostWindows()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
|
||||||
nsWindowMemoryReporter::UnlinkGhostWindows();
|
nsWindowMemoryReporter::UnlinkGhostWindows();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
#else
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue