Avoid some useless ForgetSkippable handling while we're already dealing

with snow-white objects.
This commit is contained in:
wolfbeast 2019-05-25 16:08:16 +02:00 committed by Roy Tam
commit d564849429

View file

@ -2832,6 +2832,11 @@ nsCycleCollector::ForgetSkippable(bool aRemoveChildlessNodes,
{
CheckThreadSafety();
// Avoid this when we're aleady dealing with snow-white objects.
if (mFreeingSnowWhite) {
return;
}
mozilla::Maybe<mozilla::AutoGlobalTimelineMarker> marker;
if (NS_IsMainThread()) {
marker.emplace("nsCycleCollector::ForgetSkippable", MarkerStackRequest::NO_STACK);