Avoid some useless ForgetSkippable handling while we're already dealing with snow-white objects.

This commit is contained in:
Fedor 2019-06-12 13:43:48 +03:00
parent 1da6381a9f
commit 6cd5a2225e
1 changed files with 5 additions and 0 deletions

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);