mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 12:45:27 +00:00
bug 601075 - followup to fix MSVC warings and adjust the testStringBufferMallocAccounting.js test to overwrite all conservative GC roots.
This commit is contained in:
parent
3a56f020bc
commit
0e73de0a0a
@ -4,10 +4,15 @@ for (var i = 0; i < 20; ++i)
|
||||
str = str + str;
|
||||
str.indexOf('a');
|
||||
|
||||
// copying this sucker should gc
|
||||
makeFinalizeObserver();
|
||||
var f;
|
||||
f = makeFinalizeObserver();
|
||||
assertEq(finalizeCount(), 0);
|
||||
|
||||
// Create another observer to make sure that we overwrite all conservative
|
||||
// roots for the previous one and can observer the GC.
|
||||
f = makeFinalizeObserver();
|
||||
|
||||
// if the assert fails, add more iterations
|
||||
for (var i = 0; i < 50; ++i)
|
||||
for (var i = 0; i < 80; ++i)
|
||||
str.replace(/(a)/, '$1');
|
||||
assertEq(finalizeCount(), 1);
|
||||
|
@ -261,7 +261,7 @@ struct ArenaHeader {
|
||||
}
|
||||
|
||||
void setAsFullyUsed() {
|
||||
firstFreeSpanStart = firstFreeSpanEnd = ArenaSize;
|
||||
firstFreeSpanStart = firstFreeSpanEnd = uint16_t(ArenaSize);
|
||||
}
|
||||
|
||||
FreeSpan getFirstFreeSpan() const {
|
||||
@ -543,8 +543,8 @@ ArenaHeader::init(JSCompartment *comp, unsigned kind, size_t thingSize)
|
||||
JS_ASSERT(!getMarkingDelay()->link);
|
||||
compartment = comp;
|
||||
thingKind = kind;
|
||||
firstFreeSpanStart = Arena::thingsStartOffset(thingSize);
|
||||
firstFreeSpanEnd = ArenaSize;
|
||||
firstFreeSpanStart = uint16_t(Arena::thingsStartOffset(thingSize));
|
||||
firstFreeSpanEnd = uint16_t(ArenaSize);
|
||||
}
|
||||
|
||||
inline uintptr_t
|
||||
|
Loading…
Reference in New Issue
Block a user