mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 900405 - Fix an incorrect assertion and missing check for minor GC; r=billm
This commit is contained in:
parent
e8efd45946
commit
6c49f9ce91
@ -508,7 +508,7 @@ js::Nursery::moveElementsToTenured(JSObject *dst, JSObject *src, AllocKind dstKi
|
||||
return nslots * sizeof(HeapSlot);
|
||||
}
|
||||
|
||||
JS_ASSERT(nslots > 2);
|
||||
JS_ASSERT(nslots >= 2);
|
||||
size_t nbytes = nslots * sizeof(HeapValue);
|
||||
dstHeader = static_cast<ObjectElements *>(zone->malloc_(nbytes));
|
||||
if (!dstHeader)
|
||||
|
3
js/src/jit-test/tests/gc/bug-900405.js
Normal file
3
js/src/jit-test/tests/gc/bug-900405.js
Normal file
@ -0,0 +1,3 @@
|
||||
(function() {
|
||||
[{ "9": [] }.watch([], function(){})]
|
||||
})()
|
@ -587,7 +587,7 @@ JSObject::create(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::Initi
|
||||
}
|
||||
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
if (heap != js::gc::TenuredHeap)
|
||||
if (slots && heap != js::gc::TenuredHeap)
|
||||
cx->asJSContext()->runtime()->gcNursery.notifyInitialSlots(obj, slots);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user