diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 91b9261e882c..500c50a16023 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -816,6 +816,10 @@ inline void js::Nursery::endProfile(ProfileKey key) { } bool js::Nursery::shouldCollect() const { + if (isEmpty()) { + return false; + } + if (minorGCRequested()) { return true; }