mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 01:27:30 +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;
|
return;
|
||||||
updateNumChunks(0);
|
updateNumChunks(0);
|
||||||
currentEnd_ = 0;
|
currentEnd_ = 0;
|
||||||
|
position_ = 0;
|
||||||
runtime()->gc.storeBuffer.disable();
|
runtime()->gc.storeBuffer.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,7 @@ class Nursery
|
||||||
|
|
||||||
// Free space remaining, not counting chunk trailers.
|
// Free space remaining, not counting chunk trailers.
|
||||||
MOZ_ALWAYS_INLINE size_t freeSpace() const {
|
MOZ_ALWAYS_INLINE size_t freeSpace() const {
|
||||||
|
MOZ_ASSERT(isEnabled());
|
||||||
MOZ_ASSERT(currentEnd_ - position_ <= NurseryChunkUsableSize);
|
MOZ_ASSERT(currentEnd_ - position_ <= NurseryChunkUsableSize);
|
||||||
return (currentEnd_ - position_) +
|
return (currentEnd_ - position_) +
|
||||||
(numChunks() - currentChunk_ - 1) * NurseryChunkUsableSize;
|
(numChunks() - currentChunk_ - 1) * NurseryChunkUsableSize;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue