зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 181a123cd227 (bug 1629022) by jonco's request CLOSED TREE
This commit is contained in:
Родитель
93fa5f1ac1
Коммит
2d4b72dc82
|
@ -1181,25 +1181,26 @@ static inline void CheckHolderIsSingleZone(
|
|||
aParticipant->Trace(aHolder, tracer, nullptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline bool ShouldCheckSingleZoneHolders() {
|
||||
#if defined(DEBUG)
|
||||
# ifdef DEBUG
|
||||
return true;
|
||||
#elif defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION)
|
||||
# else
|
||||
// Don't check every time to avoid performance impact.
|
||||
return rand() % 256 == 0;
|
||||
#else
|
||||
return false;
|
||||
# endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void CycleCollectedJSRuntime::TraceNativeGrayRoots(JSTracer* aTracer) {
|
||||
// NB: This is here just to preserve the existing XPConnect order. I doubt it
|
||||
// would hurt to do this after the JS holders.
|
||||
TraceAdditionalNativeGrayRoots(aTracer);
|
||||
|
||||
#ifdef CHECK_SINGLE_ZONE_JS_HOLDERS
|
||||
bool checkSingleZoneHolders = ShouldCheckSingleZoneHolders();
|
||||
#endif
|
||||
|
||||
mJSHolders.ForEach([aTracer, checkSingleZoneHolders](
|
||||
void* holder, nsScriptObjectTracer* tracer) {
|
||||
#ifdef CHECK_SINGLE_ZONE_JS_HOLDERS
|
||||
|
|
Загрузка…
Ссылка в новой задаче