Add various autorooting, bug 772303. r=terrence

This commit is contained in:
Brian Hackett
2012-08-12 19:50:49 -06:00
parent 5b0ab9c175
commit 8a27276644
39 changed files with 561 additions and 417 deletions

View File

@@ -303,8 +303,10 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions
if (!GetOrderedBindings(cx, funsc.bindings, &names))
return false;
RootedPropertyName name(cx);
for (unsigned i = 0; i < nargs; i++) {
if (!DefineArg(fn, names[i].maybeName, i, &parser))
name = names[i].maybeName;
if (!DefineArg(fn, name, i, &parser))
return false;
}
}