mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Reset nursery position when it's disabled.
This commit is contained in:
parent
ac1a607eb0
commit
4105e6bba4
2 changed files with 2 additions and 0 deletions
|
|
@ -210,6 +210,7 @@ js::Nursery::disable()
|
|||
return;
|
||||
updateNumChunks(0);
|
||||
currentEnd_ = 0;
|
||||
position_ = 0;
|
||||
runtime()->gc.storeBuffer.disable();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue