mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 935022 - Fix the interaction between generational GC zeal mode and disabling generational collection r=terrence
This commit is contained in:
parent
0143ebf10e
commit
e93128c9fc
@ -80,6 +80,10 @@ js::Nursery::enable()
|
|||||||
JS_ASSERT_IF(runtime()->gcZeal_ != ZealGenerationalGCValue, position_ == start());
|
JS_ASSERT_IF(runtime()->gcZeal_ != ZealGenerationalGCValue, position_ == start());
|
||||||
numActiveChunks_ = 1;
|
numActiveChunks_ = 1;
|
||||||
setCurrentChunk(0);
|
setCurrentChunk(0);
|
||||||
|
#ifdef JS_GC_ZEAL
|
||||||
|
if (runtime()->gcZeal_ == ZealGenerationalGCValue)
|
||||||
|
enterZealMode();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -95,6 +99,7 @@ js::Nursery::disable()
|
|||||||
void *
|
void *
|
||||||
js::Nursery::allocate(size_t size)
|
js::Nursery::allocate(size_t size)
|
||||||
{
|
{
|
||||||
|
JS_ASSERT(isEnabled());
|
||||||
JS_ASSERT(!runtime()->isHeapBusy());
|
JS_ASSERT(!runtime()->isHeapBusy());
|
||||||
|
|
||||||
/* Ensure there's enough space to replace the contents with a RelocationOverlay. */
|
/* Ensure there's enough space to replace the contents with a RelocationOverlay. */
|
||||||
|
@ -117,7 +117,10 @@ class Nursery
|
|||||||
static const uint8_t FreshNursery = 0x2a;
|
static const uint8_t FreshNursery = 0x2a;
|
||||||
static const uint8_t SweptNursery = 0x2b;
|
static const uint8_t SweptNursery = 0x2b;
|
||||||
static const uint8_t AllocatedThing = 0x2c;
|
static const uint8_t AllocatedThing = 0x2c;
|
||||||
void enterZealMode() { numActiveChunks_ = NumNurseryChunks; }
|
void enterZealMode() {
|
||||||
|
if (isEnabled())
|
||||||
|
numActiveChunks_ = NumNurseryChunks;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
4
js/src/jit-test/tests/gc/bug-935022.js
Normal file
4
js/src/jit-test/tests/gc/bug-935022.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
function callback(obj) {}
|
||||||
|
setObjectMetadataCallback(callback);
|
||||||
|
gczeal(7);
|
||||||
|
var statusitems = [];
|
Loading…
Reference in New Issue
Block a user