Bug 750577 - Use self rooters as needed; r=bhackett

These rooters were introduced in 745742, but not used throughout the method.
This commit is contained in:
Terrence Cole 2012-04-30 18:08:19 -07:00
parent f71126f4f7
commit a14beaf2df
2 changed files with 4 additions and 4 deletions

View File

@ -2518,7 +2518,7 @@ JSObject::sealOrFreeze(JSContext *cx, ImmutabilityType it)
return false;
AutoIdVector props(cx);
if (!GetPropertyNames(cx, this, JSITER_HIDDEN | JSITER_OWNONLY, &props))
if (!GetPropertyNames(cx, self, JSITER_HIDDEN | JSITER_OWNONLY, &props))
return false;
/* preventExtensions must slowify dense arrays, so we can assign to holes without checks. */

View File

@ -1096,11 +1096,11 @@ JSObject::preventExtensions(JSContext *cx)
* properties.
*/
AutoIdVector props(cx);
if (!js::GetPropertyNames(cx, this, JSITER_HIDDEN | JSITER_OWNONLY, &props))
if (!js::GetPropertyNames(cx, self, JSITER_HIDDEN | JSITER_OWNONLY, &props))
return false;
if (this->isDenseArray())
this->makeDenseArraySlow(cx, RootedVarObject(cx, this));
if (self->isDenseArray())
self->makeDenseArraySlow(cx, self);
return self->setFlag(cx, BaseShape::NOT_EXTENSIBLE, GENERATE_SHAPE);
}