Bug 880886 - Always allocate AsmJS's JSFunction in tenured; r=bhackett

--HG--
extra : rebase_source : 756c4326cedc0dfda0d1f83573fe2c277ff38073
This commit is contained in:
Terrence Cole 2013-06-11 10:53:25 -07:00
parent de88d1fec1
commit ed088df110
2 changed files with 11 additions and 1 deletions

View File

@ -6111,7 +6111,7 @@ js::CompileAsmJS(JSContext *cx, TokenStream &ts, ParseNode *fn, const CompileOpt
RootedPropertyName name(cx, FunctionName(fn));
moduleFun.set(NewFunction(cx, NullPtr(), LinkAsmJS, FunctionNumFormals(fn),
JSFunction::NATIVE_FUN, NullPtr(), name,
JSFunction::ExtendedFinalizeKind));
JSFunction::ExtendedFinalizeKind, TenuredObject));
if (!moduleFun)
return false;

View File

@ -0,0 +1,10 @@
// |jit-test| error: too much recursion
function testUniqueness(asmJSModule) {
var f = asmJSModule();
}
function lambda() {
var x = function inner() { "use asm"; function g() {} return g };
return lambda();
}
testUniqueness(lambda);