Bug 793823 - Don't create a second InternalBindingsHandle; r=billm

In FillBindingVector, we can just pass the script to BindingIter.
This commit is contained in:
Terrence Cole 2012-10-01 15:43:50 -07:00
parent f792a6afe0
commit 524d1915fb

View File

@ -263,8 +263,7 @@ Bindings::trace(JSTracer *trc)
bool bool
js::FillBindingVector(HandleScript fromScript, BindingVector *vec) js::FillBindingVector(HandleScript fromScript, BindingVector *vec)
{ {
InternalBindingsHandle bindings(fromScript, &fromScript->bindings); for (BindingIter bi(fromScript); bi; bi++) {
for (BindingIter bi(bindings); bi; bi++) {
if (!vec->append(*bi)) if (!vec->append(*bi))
return false; return false;
} }