Bug 906236 - Sweep DeclEnvObjects in the background; r=luke

This commit is contained in:
Terrence Cole 2013-09-04 08:46:28 -07:00
parent c17dd3b37a
commit 74862ec49a
3 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,9 @@
// |jit-test| error: too much recursion
(function() {
(function f(x) {
return x * f(x - 1);
with({})
var r = ""
})()
})()

View File

@ -333,6 +333,8 @@ Class DeclEnvObject::class_ = {
DeclEnvObject *
DeclEnvObject::createTemplateObject(JSContext *cx, HandleFunction fun, gc::InitialHeap heap)
{
JS_ASSERT(IsNurseryAllocable(FINALIZE_KIND));
RootedTypeObject type(cx, cx->getNewType(&class_, NULL));
if (!type)
return NULL;

View File

@ -256,7 +256,7 @@ class DeclEnvObject : public ScopeObject
public:
static const uint32_t RESERVED_SLOTS = 2;
static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT2;
static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT2_BACKGROUND;
static Class class_;