From 57e5655e8a3157c4691bfab4a98af169a2aa11d5 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 25 May 2019 16:08:16 +0200 Subject: Avoid some useless ForgetSkippable handling while we're already dealing with snow-white objects. --- xpcom/base/nsCycleCollector.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xpcom/base') diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index 06ed42326..5dffa7409 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -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 marker; if (NS_IsMainThread()) { marker.emplace("nsCycleCollector::ForgetSkippable", MarkerStackRequest::NO_STACK); -- cgit v1.2.3