summaryrefslogtreecommitdiffstats
path: root/js/src/gc/Nursery.h
diff options
context:
space:
mode:
authorJon Coppeard <jcoppeard@mozilla.com>2019-03-22 13:17:31 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-22 13:17:31 +0100
commitc53602c802cfaeaede20cb0bb2180194389eeb05 (patch)
treebceef6e735c321566a0b64cd5dfd909022e46715 /js/src/gc/Nursery.h
parent8549c7cc31352e7d0cf89606d109f7c827ebab82 (diff)
downloadUXP-c53602c802cfaeaede20cb0bb2180194389eeb05.tar
UXP-c53602c802cfaeaede20cb0bb2180194389eeb05.tar.gz
UXP-c53602c802cfaeaede20cb0bb2180194389eeb05.tar.lz
UXP-c53602c802cfaeaede20cb0bb2180194389eeb05.tar.xz
UXP-c53602c802cfaeaede20cb0bb2180194389eeb05.zip
Reset nursery position when it's disabled.
Diffstat (limited to 'js/src/gc/Nursery.h')
-rw-r--r--js/src/gc/Nursery.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h
index 0d215d997..a839a4979 100644
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -245,6 +245,7 @@ class Nursery
// Free space remaining, not counting chunk trailers.
MOZ_ALWAYS_INLINE size_t freeSpace() const {
+ MOZ_ASSERT(isEnabled());
MOZ_ASSERT(currentEnd_ - position_ <= NurseryChunkUsableSize);
return (currentEnd_ - position_) +
(numChunks() - currentChunk_ - 1) * NurseryChunkUsableSize;