From 56d2b77b31e9e254256e2b27723b412100814860 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Wed, 17 Aug 2016 11:02:25 +0100 Subject: [PATCH] Bug 1295027 - Fix spurious rooting hazard r=me --- js/src/gc/Nursery.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 5e8563123ed5..5b8b4e71675e 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -566,6 +566,10 @@ js::Nursery::collect(JSRuntime* rt, JS::gcreason::Reason reason) startProfile(ProfileKey::Total); + // The hazard analysis thinks doCollection can invalidate pointers in + // tenureCounts below. + JS::AutoSuppressGCAnalysis nogc; + TenureCountCache tenureCounts; double promotionRate = doCollection(rt, reason, tenureCounts);