mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 874258 - Warn if we run shutdown CC more than twice. r=smaug
This commit is contained in:
parent
6ca2dfc7bd
commit
c87e5231b9
@ -160,6 +160,9 @@ using namespace mozilla;
|
||||
|
||||
#define DEFAULT_SHUTDOWN_COLLECTIONS 5
|
||||
|
||||
// One to do the freeing, then another to detect there is no more work to do.
|
||||
#define NORMAL_SHUTDOWN_COLLECTIONS 2
|
||||
|
||||
#if defined(XP_WIN)
|
||||
// Defined in nsThreadManager.cpp.
|
||||
extern DWORD gTLSThreadIDIndex;
|
||||
@ -2754,6 +2757,8 @@ nsCycleCollector::ShutdownCollect(nsICycleCollectorListener *aListener)
|
||||
return;
|
||||
|
||||
for (uint32_t i = 0; i < DEFAULT_SHUTDOWN_COLLECTIONS; ++i) {
|
||||
NS_WARN_IF_FALSE(i < NORMAL_SHUTDOWN_COLLECTIONS, "Extra shutdown CC");
|
||||
|
||||
// Synchronous cycle collection. Always force a JS GC beforehand.
|
||||
FixGrayBits(true);
|
||||
if (aListener && NS_FAILED(aListener->Begin()))
|
||||
|
Loading…
Reference in New Issue
Block a user