Backed out changeset 49aa36d0b28a and eaf2526ffd90 (bug 1146696) for jit-test failures on a CLOSED TREE

This commit is contained in:
Jon Coppeard 2015-03-27 15:04:35 +00:00
parent 58532a07b7
commit 25f7b0caae
3 changed files with 7 additions and 32 deletions

View File

@ -232,7 +232,7 @@ GCRuntime::tryNewTenuredThing(ExclusiveContext *cx, AllocKind kind, size_t thing
{
T *t = reinterpret_cast<T *>(cx->arenas()->allocateFromFreeList(kind, thingSize));
if (!t)
t = reinterpret_cast<T *>(refillFreeListFromAnyThread<allowGC>(cx, kind, thingSize));
t = reinterpret_cast<T *>(refillFreeListFromAnyThread<allowGC>(cx, kind));
checkIncrementalZoneState(cx, t);
TraceTenuredAlloc(t, kind);
@ -241,19 +241,19 @@ GCRuntime::tryNewTenuredThing(ExclusiveContext *cx, AllocKind kind, size_t thing
template <AllowGC allowGC>
/* static */ void *
GCRuntime::refillFreeListFromAnyThread(ExclusiveContext *cx, AllocKind thingKind, size_t thingSize)
GCRuntime::refillFreeListFromAnyThread(ExclusiveContext *cx, AllocKind thingKind)
{
MOZ_ASSERT(cx->arenas()->freeLists[thingKind].isEmpty());
if (cx->isJSContext())
return refillFreeListFromMainThread<allowGC>(cx->asJSContext(), thingKind, thingSize);
return refillFreeListFromMainThread<allowGC>(cx->asJSContext(), thingKind);
return refillFreeListOffMainThread(cx, thingKind);
}
template <AllowGC allowGC>
/* static */ void *
GCRuntime::refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind, size_t thingSize)
GCRuntime::refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind)
{
JSRuntime *rt = cx->runtime();
MOZ_ASSERT(!rt->isHeapBusy(), "allocating while under GC");
@ -277,11 +277,7 @@ GCRuntime::refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind, size
}
// Retry the allocation after the last-ditch GC.
// Note that due to GC callbacks we might already have allocated an arena
// for this thing kind!
thing = cx->arenas()->allocateFromFreeList(thingKind, thingSize);
if (!thing)
thing = tryRefillFreeListFromMainThread(cx, thingKind);
thing = tryRefillFreeListFromMainThread(cx, thingKind);
if (thing)
return thing;

View File

@ -879,11 +879,9 @@ class GCRuntime
template <typename T>
static void checkIncrementalZoneState(ExclusiveContext *cx, T *t);
template <AllowGC allowGC>
static void *refillFreeListFromAnyThread(ExclusiveContext *cx, AllocKind thingKind,
size_t thingSize);
static void *refillFreeListFromAnyThread(ExclusiveContext *cx, AllocKind thingKind);
template <AllowGC allowGC>
static void *refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind,
size_t thingSize);
static void *refillFreeListFromMainThread(JSContext *cx, AllocKind thingKind);
static void *tryRefillFreeListFromMainThread(JSContext *cx, AllocKind thingKind);
static void *refillFreeListOffMainThread(ExclusiveContext *cx, AllocKind thingKind);

View File

@ -1,19 +0,0 @@
dbg1 = new Debugger();
root2 = newGlobal();
dbg1.memory.onGarbageCollection = function(){}
dbg1.addDebuggee(root2);
for (var j = 0; j < 9999; ++j) {
try {
a
} catch (e) {}
}
gcparam("maxBytes", gcparam("gcBytes") + 1);
function g(i) {
if (i == 0)
return;
var x = "";
function f() {}
eval('');
g(i - 1);
}
g(8000);