summaryrefslogtreecommitdiff
path: root/xpcom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-05-25 16:08:16 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-05-25 16:08:16 +0200
commit8840b0640a288762345a5d7e9ed073a45912c428 (patch)
tree0cc38fd4a41c6ff91a5a561c65d6cd74e15e8b23 /xpcom
parentf11914b70172c6b3bd523af6f8b1cc15607cda04 (diff)
downloaduxp-8840b0640a288762345a5d7e9ed073a45912c428.tar.gz
Avoid some useless ForgetSkippable handling while we're already dealing
with snow-white objects.
Diffstat (limited to 'xpcom')
-rw-r--r--xpcom/base/nsCycleCollector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
index 06ed423263..5dffa7409a 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<mozilla::AutoGlobalTimelineMarker> marker;
if (NS_IsMainThread()) {
marker.emplace("nsCycleCollector::ForgetSkippable", MarkerStackRequest::NO_STACK);