summaryrefslogtreecommitdiffstats
path: root/dom/workers/WorkerPrivate.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-01-26 22:42:46 +0000
committerMoonchild <moonchild@palemoon.org>2021-01-26 22:42:46 +0000
commit8fd57ace20e1e6bb59dd83ed59f513954c0aed9d (patch)
tree7d35359f7361ec1a649429085010b2464f17059a /dom/workers/WorkerPrivate.cpp
parent2836e514661df0ffd816cf957ecc35c968377fbe (diff)
downloadUXP-8fd57ace20e1e6bb59dd83ed59f513954c0aed9d.tar
UXP-8fd57ace20e1e6bb59dd83ed59f513954c0aed9d.tar.gz
UXP-8fd57ace20e1e6bb59dd83ed59f513954c0aed9d.tar.lz
UXP-8fd57ace20e1e6bb59dd83ed59f513954c0aed9d.tar.xz
UXP-8fd57ace20e1e6bb59dd83ed59f513954c0aed9d.zip
[DOM] Try to avoid slow shrinking GC during sync calls
Diffstat (limited to 'dom/workers/WorkerPrivate.cpp')
-rw-r--r--dom/workers/WorkerPrivate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp
index 860bf8468..1f8b3b70c 100644
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -6392,7 +6392,7 @@ WorkerPrivate::GarbageCollectInternal(JSContext* aCx, bool aShrinking,
if (aShrinking || aCollectChildren) {
JS::PrepareForFullGC(aCx);
- if (aShrinking) {
+ if (aShrinking && mSyncLoopStack.IsEmpty()) {
JS::GCForReason(aCx, GC_SHRINK, JS::gcreason::DOM_WORKER);
if (!aCollectChildren) {